pull/8086/merge
Thomas DELORGE 2 days ago committed by GitHub
commit d26f403e8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -41,6 +41,7 @@ module.exports = {
SiteMutation: { SiteMutation: {
async updateConfig(obj, args, context) { async updateConfig(obj, args, context) {
try { try {
const previousHost = WIKI.config.host
if (args.hasOwnProperty('host')) { if (args.hasOwnProperty('host')) {
let siteHost = _.trim(args.host) let siteHost = _.trim(args.host)
if (siteHost.endsWith('/')) { if (siteHost.endsWith('/')) {
@ -133,6 +134,11 @@ module.exports = {
WIKI.app.disable('trust proxy') WIKI.app.disable('trust proxy')
} }
if (WIKI.config.host !== previousHost) {
await WIKI.auth.activateStrategies()
WIKI.events.outbound.emit('reloadAuthStrategies')
}
return { return {
responseResult: graphHelper.generateSuccess('Site configuration updated successfully') responseResult: graphHelper.generateSuccess('Site configuration updated successfully')
} }

Loading…
Cancel
Save