add support for protected sites
https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/ https://gock.net/blog/2020/nginx-subrequest-authentication-server/ https://github.com/andygock/auth-server
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user