Girish Ramakrishnan
2020-11-09 20:34:48 -08:00
parent 01e6301332
commit 71666a028b
12 changed files with 412 additions and 11 deletions

View File

@@ -380,7 +380,8 @@ function writeDashboardNginxConfig(bundle, configFileName, vhost, callback) {
endpoint: 'admin',
certFilePath: bundle.certFilePath,
keyFilePath: bundle.keyFilePath,
robotsTxtQuoted: JSON.stringify('User-agent: *\nDisallow: /\n')
robotsTxtQuoted: JSON.stringify('User-agent: *\nDisallow: /\n'),
authwall: { enabled: false, id: null }
};
var nginxConf = ejs.render(NGINX_APPCONFIG_EJS, data);
var nginxConfigFilename = path.join(paths.NGINX_APPCONFIG_DIR, configFileName);
@@ -455,7 +456,11 @@ function writeAppNginxConfig(app, bundle, callback) {
keyFilePath: bundle.keyFilePath,
robotsTxtQuoted,
cspQuoted,
hideHeaders
hideHeaders,
authwall: {
enabled: app.sso && safe.query(app, 'manifest.addons.ldap.authwall', false),
id: app.id
}
};
var nginxConf = ejs.render(NGINX_APPCONFIG_EJS, data);
@@ -486,7 +491,8 @@ function writeAppRedirectNginxConfig(app, fqdn, bundle, callback) {
keyFilePath: bundle.keyFilePath,
robotsTxtQuoted: null,
cspQuoted: null,
hideHeaders: []
hideHeaders: [],
authwall: { enabled: false, id: app.id }
};
var nginxConf = ejs.render(NGINX_APPCONFIG_EJS, data);
@@ -673,7 +679,8 @@ function writeDefaultConfig(options, callback) {
endpoint: options.activated ? 'ip' : 'setup',
certFilePath,
keyFilePath,
robotsTxtQuoted: JSON.stringify('User-agent: *\nDisallow: /\n')
robotsTxtQuoted: JSON.stringify('User-agent: *\nDisallow: /\n'),
authwall: { 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);