move requiresOAuthProxy to nginx

we have 3 levels
    * routes, cron, apptask
    * everything else where everyone calls everyone :-)
    * the db layer
This commit is contained in:
Girish Ramakrishnan
2016-03-17 11:38:27 -07:00
parent 42796b12dc
commit 3499a4cc6c
3 changed files with 18 additions and 19 deletions
+2 -3
View File
@@ -101,12 +101,11 @@ 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, oauthProxy, certFilePath, keyFilePath, callback);
nginx.configureApp(app, certFilePath, keyFilePath, callback);
});
}
@@ -163,7 +162,7 @@ function allocateOAuthProxyCredentials(app, callback) {
assert.strictEqual(typeof app, 'object');
assert.strictEqual(typeof callback, 'function');
if (!apps.requiresOAuthProxy(app)) return callback(null);
if (!nginx.requiresOAuthProxy(app)) return callback(null);
var id = 'cid-' + uuid.v4();
var clientSecret = hat(256);