From edec3601f4a548e03775ff1c27e708a550b8769d Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 19 Feb 2016 15:43:39 +0100 Subject: [PATCH] Do not rely on oauthProxy property of app object in nginx configuration code --- src/nginx.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nginx.js b/src/nginx.js index 22057cec6..3fdadc204 100644 --- a/src/nginx.js +++ b/src/nginx.js @@ -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 = {