A caching HTTP forward proxy.
Features:
headerOrder
in index.js)User-Agent
instead of user-agent
)X-Cache-Preferred
header isPROXY_AUTH
is set, the proxy will reject allX-Proxy-Auth
with theMONGO_URI
to specifylocalhost/http-proxy-cache
)npm install http-proxy-cache -g
To start the proxy, simply run:
http-proxy-cache
This is an example app that uses the request module to perform a HTTP request via the proxy to httpbin which will echo the HTTP request back as the reponse body:
var request = require('request')
request({
uri: 'http://httpbin.org/get',
proxy: 'http://<your-proxy-domain-here>'
}, function (err, res, body) {
if (err) throw err
console.log(body)
})
Set the environment variable DEBUG=proxy
to enable debug mode.
MIT