Skip to content

Instantly share code, notes, and snippets.

@lloyd
Created May 3, 2013 22:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lloyd/5514735 to your computer and use it in GitHub Desktop.
Save lloyd/5514735 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
var httpProxy = require('http-proxy'),
path = require('path'),
fs = require('fs');
httpProxy.createServer(443, 'login.persona.org', {
https: {
key: fs.readFileSync(path.join(process.env['HOME'], 'key.pem'), 'utf8'),
cert: fs.readFileSync(path.join(process.env['HOME'], 'cert.pem'), 'utf8')
},
target: {
https: true,
rejectUnauthorized: false
}
}).listen(8443);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment