From aa8278d061ec04f02443bf4e1c8a569d9556d11a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 25 Mar 2019 15:40:00 +0100 Subject: [PATCH] Proxy /.well-known/webfinger to backend @Mastercuber I hope this does not interfere with anything that uses `/.well-known`, too. Would you suggest to proxy everything related to webfinger to the backend? My motivation for proxying webfinger is that you can search for `someuser@nitro-staging.human-connection.org` instead of `someuser@nitro-staging.human-connection.org/activityPub`. This is better user experience in my opinion. --- webapp/nuxt.config.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js index 7669af8f2..8c8f249e8 100644 --- a/webapp/nuxt.config.js +++ b/webapp/nuxt.config.js @@ -121,24 +121,21 @@ module.exports = { proxy: true }, proxy: { + '/.well-known/webfinger': { + target: process.env.GRAPHQL_URI || 'http://localhost:4000', + toProxy: true, // cloudflare needs that + }, '/activityPub': { // make this configurable (nuxt-dotenv) target: process.env.GRAPHQL_URI || 'http://localhost:4000', pathRewrite: { '^/activityPub': '' }, toProxy: true, // cloudflare needs that - changeOrigin: true, - headers: { - Accept: 'application/json', - 'X-UI-Request': true, - 'X-API-TOKEN': process.env.BACKEND_TOKEN || 'NULL' - } }, '/api': { // make this configurable (nuxt-dotenv) target: process.env.GRAPHQL_URI || 'http://localhost:4000', pathRewrite: { '^/api': '' }, toProxy: true, // cloudflare needs that - changeOrigin: true, headers: { Accept: 'application/json', 'X-UI-Request': true,