Created
August 31, 2011 17:51
-
-
Save demian85/1184180 to your computer and use it in GitHub Desktop.
node http proxy
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
var httpProxy = require('http-proxy'), | |
http = require('http'); | |
var options = { | |
router: { | |
'.*?\.demian.magic.com': '127.0.0.1:8000' | |
} | |
}; | |
var proxyServer = httpProxy.createServer(options); | |
proxyServer.listen(80); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment