- run
npm iwith Node JS >=12 - run with
npm startor with an alway on service like `pm2``
- each
URLrequest toproxy-url/{URL}will be proxied by the proxy-domain
If your app hosted on domain1.com wants to request images from somewhere else, the requests will likely be blocked due to CORS policies.
Therefore you can host the Simple Node Proxy on the same domain (e.g. a subdomain or just ip:port) and proxy all request for external ressources to the path proxy-url/external-image-source (e.g. proxy.domain1.com/www.external-image-url.com/1.jpg)
- for HTTPS support please add your cert into the cert folder and adjust the name/pass file in the source code
- install mkcert from
https://github.com/FiloSottile/mkcert(e.g.brew install mkcert) - for firefox support install also
brew install nss - run e.g.
mkcert -key-file key.pem -cert-file cert.pem localhost 127.0.0.1to generate cert and key file - run
mkcert -installto install certificates on local machine - copy
key.pemandcert.pemfile intosrc/cert/