Skip to content

Commit

Permalink
add a new flag "WITH_KERBEROS_PROXY_FRONTEND"
Browse files Browse the repository at this point in the history
This will be used to run the connector with a kerberos proxy in front of it.
  • Loading branch information
jfromaniello committed Mar 9, 2016
1 parent 30b9a2e commit b82c458
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,16 @@ connectorSetup.run(__dirname, function(err) {
if (nconf.get('KERBEROS_AUTH')) {
console.log('Using kerberos authentication');

if (process.platform !== 'win32') {
if (process.platform === 'win32') {
var kerberos_server = require('kerberos-server');
kerberos_server.createServer(options, app);
} else if (nconf.get('WITH_KERBEROS_PROXY_FRONTEND')) {
var http = require('http');
http.createServer(app).listen(options.port);
} else {
return console.log('Detected KERBEROS_AUTH in config, but this platform doesn\'t support it.');
}

var kerberos_server = require('kerberos-server');
kerberos_server.createServer(options, app);
}

console.log('listening on port: ' + nconf.get('PORT'));
Expand Down

0 comments on commit b82c458

Please sign in to comment.