This is a quick and dirty proxy to be used locally in order to avoid all the pain of CORS during development (and development only!).
Typically you'd have:
- a html page on your hard drive, say
index.html
, embedding some javascript that you are currently working on - some javascript making XHR calls to a remote API, located on a server locally or elsewhere in your domain, which you do not wish to touch
Your browser will normally blocks the javascript requests because of its same-origin policy.
The problem goes away if you serve both the fixed assets (html, javascript) and the API from the same origin.