Dynamically detect if an oauth proxy should be used for an app

This commit is contained in:
Johannes Zellner
2016-02-19 15:44:15 +01:00
parent edec3601f4
commit f731c1ed0b
+2 -1
View File
@@ -101,11 +101,12 @@ function configureNginx(app, callback) {
assert.strictEqual(typeof callback, 'function');
var vhost = config.appFqdn(app.location);
var oauthProxy = apps.requiresOAuthProxy(app);
certificates.ensureCertificate(vhost, function (error, certFilePath, keyFilePath) {
if (error) return callback(error);
nginx.configureApp(app, certFilePath, keyFilePath, callback);
nginx.configureApp(app, oauthProxy, certFilePath, keyFilePath, callback);
});
}