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.
This commit is contained in:
Robert Schäfer 2019-03-25 15:40:00 +01:00
parent b32c85b2de
commit aa8278d061

View File

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