node-http-proxy/examples/https-secure.js
2013-09-17 14:51:56 -07:00

16 lines
411 B
JavaScript

var caronte = require('caronte'),
https = require('https');
/*
* Create your proxy server pointing to a secure domain
* Enable ssl validation
*/
var options = {target : 'https://google.com',
agent : https.globalAgent,
headers: {host: 'google.com'}
};
var proxyServer = caronte.createProxyServer(options);
console.log("Proxy server listening on port 8000");
proxyServer.listen(8000);