mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
14 lines
327 B
JavaScript
14 lines
327 B
JavaScript
var httpProxy = require('../lib/http-proxy');
|
|
/*
|
|
* Create your proxy server pointing to a secure domain
|
|
*/
|
|
var options = {
|
|
target:'https://google.com',
|
|
headers: {host: 'google.com'}
|
|
};
|
|
|
|
var proxyServer = httpProxy.createProxyServer(options);
|
|
console.log("Proxy server listening on port 8000");
|
|
proxyServer.listen(8000);
|
|
|