Do not rely on oauthProxy property of app object in nginx configuration code

This commit is contained in:
Johannes Zellner
2016-02-19 15:43:39 +01:00
parent 9e87fd0440
commit edec3601f4

View File

@@ -43,14 +43,15 @@ function configureAdmin(certFilePath, keyFilePath, callback) {
reload(callback);
}
function configureApp(app, certFilePath, keyFilePath, callback) {
function configureApp(app, oauthProxy, certFilePath, keyFilePath, callback) {
assert.strictEqual(typeof app, 'object');
assert.strictEqual(typeof oauthProxy, 'boolean');
assert.strictEqual(typeof certFilePath, 'string');
assert.strictEqual(typeof keyFilePath, 'string');
assert.strictEqual(typeof callback, 'function');
var sourceDir = path.resolve(__dirname, '..');
var endpoint = app.oauthProxy ? 'oauthproxy' : 'app';
var endpoint = oauthProxy ? 'oauthproxy' : 'app';
var vhost = config.appFqdn(app.location);
var data = {