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.
This commit is contained in:
Robert Schäfer 2019-03-25 23:53:26 +01:00
parent 46aecd6120
commit f73198f9f2

View File

@ -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)