From f73198f9f28ed40954f0d7b82ac96357cbb613df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 25 Mar 2019 23:53:26 +0100 Subject: [PATCH] Try/error: Add headers back `git diff b32c85b2de014770d07df8a642616b016cf69b50..46aecd612018db490fb3d6f91572be848371b32e -- webapp/nuxt.config.js` showed me that I removed headers because I didn't thought they are relevant. Now the proxy route `/activityPub` is not reachable anymore. --- webapp/nuxt.config.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js index 80b17a26c..769b0fca0 100644 --- a/webapp/nuxt.config.js +++ b/webapp/nuxt.config.js @@ -123,13 +123,23 @@ module.exports = { proxy: { '/.well-known/webfinger': { target: process.env.GRAPHQL_URI || 'http://localhost:4000', - toProxy: true // cloudflare needs that + toProxy: true, // cloudflare needs that + headers: { + Accept: 'application/json', + 'X-UI-Request': true, + 'X-API-TOKEN': process.env.BACKEND_TOKEN || 'NULL' + } }, - '/activityPub': { + '/activitypub': { // make this configurable (nuxt-dotenv) target: process.env.GRAPHQL_URI || 'http://localhost:4000', - pathRewrite: { '^/activityPub': '' }, - toProxy: true // cloudflare needs that + pathRewrite: { '^/activitypub': '' }, + toProxy: true, // cloudflare needs that + headers: { + Accept: 'application/json', + 'X-UI-Request': true, + 'X-API-TOKEN': process.env.BACKEND_TOKEN || 'NULL' + } }, '/api': { // make this configurable (nuxt-dotenv)