regenerate nginx config when proxyAuth changes

This commit is contained in:
Girish Ramakrishnan
2020-12-17 10:25:23 -08:00
parent f55300eba5
commit 583c544cae

View File

@@ -797,6 +797,7 @@ function update(app, args, progressCallback, callback) {
// FIXME: this does not handle option changes (like multipleDatabases)
const unusedAddons = _.omit(app.manifest.addons, Object.keys(updateConfig.manifest.addons));
const httpPathsChanged = app.manifest.httpPaths !== updateConfig.manifest.httpPaths;
const proxyAuthChanged = !_.isEqual(safe.query(app.manifest, 'addons.proxyAuth'), safe.query(updateConfig.manifest, 'addons.proxyAuth'));
async.series([
// this protects against the theoretical possibility of an app being marked for update from
@@ -871,10 +872,9 @@ function update(app, args, progressCallback, callback) {
startApp.bind(null, app),
// needed for httpPaths changes
progressCallback.bind(null, { percent: 90, message: 'Configuring reverse proxy' }),
function (next) {
if (!httpPathsChanged) return next();
if (!httpPathsChanged && !proxyAuthChanged) return next();
configureReverseProxy(app, next);
},