proxyAuth: allow protecting specific subpath
while I don't think this is useful for apps, it is useful for e2e test atleast
This commit is contained in:
@@ -381,7 +381,7 @@ function writeDashboardNginxConfig(bundle, configFileName, vhost, callback) {
|
||||
certFilePath: bundle.certFilePath,
|
||||
keyFilePath: bundle.keyFilePath,
|
||||
robotsTxtQuoted: JSON.stringify('User-agent: *\nDisallow: /\n'),
|
||||
proxyAuth: { enabled: false, id: null }
|
||||
proxyAuth: { enabled: false, id: null, path: '/' }
|
||||
};
|
||||
var nginxConf = ejs.render(NGINX_APPCONFIG_EJS, data);
|
||||
var nginxConfigFilename = path.join(paths.NGINX_APPCONFIG_DIR, configFileName);
|
||||
@@ -460,7 +460,8 @@ function writeAppNginxConfig(app, bundle, callback) {
|
||||
hideHeaders,
|
||||
proxyAuth: {
|
||||
enabled: app.sso && app.manifest.addons && app.manifest.addons.proxyAuth,
|
||||
id: app.id
|
||||
id: app.id,
|
||||
path: safe.query(app.manifest, 'addons.proxyAuth.path') || '/'
|
||||
},
|
||||
httpPaths: app.manifest.httpPaths || {}
|
||||
};
|
||||
@@ -494,7 +495,7 @@ function writeAppRedirectNginxConfig(app, fqdn, bundle, callback) {
|
||||
robotsTxtQuoted: null,
|
||||
cspQuoted: null,
|
||||
hideHeaders: [],
|
||||
proxyAuth: { enabled: false, id: app.id }
|
||||
proxyAuth: { enabled: false, id: app.id, path: '/' }
|
||||
};
|
||||
var nginxConf = ejs.render(NGINX_APPCONFIG_EJS, data);
|
||||
|
||||
@@ -682,7 +683,7 @@ function writeDefaultConfig(options, callback) {
|
||||
certFilePath,
|
||||
keyFilePath,
|
||||
robotsTxtQuoted: JSON.stringify('User-agent: *\nDisallow: /\n'),
|
||||
proxyAuth: { enabled: false, id: null }
|
||||
proxyAuth: { enabled: false, id: null, path: '/' }
|
||||
};
|
||||
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