mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Choose correct env var + proxy /activityPub
This commit is contained in:
parent
ebb1c283b7
commit
b32c85b2de
@ -12,6 +12,6 @@ const serverConfig = {
|
||||
const server = createServer()
|
||||
server.start(serverConfig, options => {
|
||||
/* eslint-disable-next-line no-console */
|
||||
console.log(`Server ready at ${process.env.GRAPHQL_URI} 🚀`)
|
||||
console.log(`Server ready at ${process.env.CLIENT_URI} 🚀`)
|
||||
ActivityPub.init(server)
|
||||
})
|
||||
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
CreateUser: async (resolve, root, args, context, info) => {
|
||||
const keys = generateRsaKeyPair()
|
||||
Object.assign(args, keys)
|
||||
args.actorId = `${process.env.GRAPHQL_URI}/activitypub/users/${args.slug}`
|
||||
args.actorId = `${activityPub.host}/activitypub/users/${args.slug}`
|
||||
return resolve(root, args, context, info)
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,6 +121,18 @@ module.exports = {
|
||||
proxy: true
|
||||
},
|
||||
proxy: {
|
||||
'/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',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user