Add proxyAuth as an addon

This commit is contained in:
Girish Ramakrishnan
2020-11-10 09:59:28 -08:00
parent 86916a94de
commit 625dc7c49b
12 changed files with 47 additions and 21 deletions
+5 -5
View File
@@ -381,7 +381,7 @@ function writeDashboardNginxConfig(bundle, configFileName, vhost, callback) {
certFilePath: bundle.certFilePath,
keyFilePath: bundle.keyFilePath,
robotsTxtQuoted: JSON.stringify('User-agent: *\nDisallow: /\n'),
authwall: { enabled: false, id: null }
proxyAuth: { enabled: false, id: null }
};
var nginxConf = ejs.render(NGINX_APPCONFIG_EJS, data);
var nginxConfigFilename = path.join(paths.NGINX_APPCONFIG_DIR, configFileName);
@@ -457,8 +457,8 @@ function writeAppNginxConfig(app, bundle, callback) {
robotsTxtQuoted,
cspQuoted,
hideHeaders,
authwall: {
enabled: app.sso && safe.query(app, 'manifest.addons.ldap.authwall', false),
proxyAuth: {
enabled: app.sso && app.manifest.addons && app.manifest.addons.proxyAuth,
id: app.id
}
};
@@ -492,7 +492,7 @@ function writeAppRedirectNginxConfig(app, fqdn, bundle, callback) {
robotsTxtQuoted: null,
cspQuoted: null,
hideHeaders: [],
authwall: { enabled: false, id: app.id }
proxyAuth: { enabled: false, id: app.id }
};
var nginxConf = ejs.render(NGINX_APPCONFIG_EJS, data);
@@ -680,7 +680,7 @@ function writeDefaultConfig(options, callback) {
certFilePath,
keyFilePath,
robotsTxtQuoted: JSON.stringify('User-agent: *\nDisallow: /\n'),
authwall: { enabled: false, id: null }
proxyAuth: { enabled: false, id: null }
};
const nginxConf = ejs.render(NGINX_APPCONFIG_EJS, data);
const nginxConfigFilename = path.join(paths.NGINX_APPCONFIG_DIR, constants.NGINX_DEFAULT_CONFIG_FILE_NAME);