Skip to content

Instantly share code, notes, and snippets.

@russiann
Created May 1, 2017 20:01
Show Gist options
  • Save russiann/c72b4365f5bcee7bbbb1673cd459b22c to your computer and use it in GitHub Desktop.
Save russiann/c72b4365f5bcee7bbbb1673cd459b22c to your computer and use it in GitHub Desktop.
HTTPS Proxy
var fs = require('fs');
var http = require('http'),
httpProxy = require('http-proxy');
httpProxy.createProxyServer(
{
target:'http://localhost:8081',
ssl: {
key: fs.readFileSync('key.pem', 'utf8'),
cert: fs.readFileSync('cert.pem', 'utf8'),
passphrase: 'reactvr'
},
}).listen(8000);
console.log('Running!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment