You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be nice to add templates for http-master and http-proxy. They are Apache/Nginx-like tools for Node.js (perhaps easier to work with, it's just JS!).
For example, the config for http-proxy might look like
// -- ####### HTTPS PROXY SERVER #######varfs=require("fs")varfiles=["/etc/letsencrypt/live/example.com/chain.pem",]varcaChain=[]files.forEach(function(file){caChain.push(fs.readFileSync(file))})varhttpsOptions={https: {ca: caChain,key: fs.readFileSync('/etc/letsencrypt/live/example.com/privkey.pem','utf8'),cert: fs.readFileSync('/etc/letsencrypt/live/example.com/cert.pem','utf8')},router: {'example.com': '127.0.0.1:5678',// map a domain to a local service// ... etc ...}// ... other options ...}varhttpsProxyServer=httpProxy.createServer(httpsOptions,function(request,response,proxy){// do whatever you need with the request and response objects, f.e. redirect certain paths to another domain, etc.})httpsProxyServer.listen(443)// listen on the standard HTTPS port.
The text was updated successfully, but these errors were encountered:
It'd be nice to add templates for http-master and http-proxy. They are Apache/Nginx-like tools for Node.js (perhaps easier to work with, it's just JS!).
For example, the config for http-proxy might look like
The text was updated successfully, but these errors were encountered: