Skip to content

Commit

Permalink
Starting before keystone auth
Browse files Browse the repository at this point in the history
  • Loading branch information
aalonsog committed Sep 17, 2015
1 parent 3077b35 commit 359b806
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,19 @@ IDM.authenticate (function (token) {

log.info('Success authenticating PEP proxy. Proxy Auth-token: ', token);

if (config.https.enabled === true) {
var options = {
key: fs.readFileSync(config.https.key_file),
cert: fs.readFileSync(config.https.cert_file)
};

https.createServer(options, function(req,res) {
app.handle(req, res);
}).listen(app.get('port'));
} else {
app.listen(app.get('port'));
}

}, function (status, e) {
log.error('Error in keystone communication', e);
});


if (config.https.enabled === true) {
var options = {
key: fs.readFileSync(config.https.key_file),
cert: fs.readFileSync(config.https.cert_file)
};

https.createServer(options, function(req,res) {
app.handle(req, res);
}).listen(app.get('port'));
} else {
app.listen(app.get('port'));
}

0 comments on commit 359b806

Please sign in to comment.