Created
January 12, 2017 14:37
-
-
Save MrFrankel/db0ea3c7989469a0b74f06180a3512ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https.createServer(credentials, function (req, res) { | |
Object.keys(options.routingTable).some(function (key) { | |
const regX = new RegExp(key); | |
if (regX.test(req.url)) { | |
printMe(req.url + ' => ' + (options.routingTable[key].targetName || options.routingTable.target)); | |
proxy.web(req, res, options.routingTable[key]); | |
curTarget = options.routingTable[key]; | |
return true; | |
} | |
}); | |
}).listen(options.home_port); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment