standalone CORS proxy
npm install -g corsproxy
corsproxy
# with custom port: CORSPROXY_PORT=1234 corsproxy
# with custom host: CORSPROXY_HOST=localhost corsproxy
# with debug server: DEBUG=1 corsproxy
The cors proxy will start at http://localhost:1337. To access another domain, use the domain name (including port) as the first folder, e.g.
- http://localhost:1337/localhost:3000/sign_in
- http://localhost:1337/my.domain.com/path/to/resource
- etc etc
- Create heroku app with URL: 'lexington-cors-proxy'
- From local dev machine:
git push heroku master
heroku config:set CORSANYWHERE_WHITELIST='lfucg.github.io','http://localhost:.*','.*lexky-d8.pantheonsite.io','.*lexingtonky.formstack.com','.*\.lexingtonky\.gov'
- To send CORS requests to https://www.citygram.org/subscriptions`, you use
https://lexington-cors-proxy.herokuapp.com/www.citygram.org/subscriptions
MIT