Disable CORS

Rewrites the Access-Control-Allow-Origin header to have the value of Origin header. In other words, to the browser, it appears that the server has whitelisted exactly the site you're on.
This is better than Access-Control-Allow-Origin: * (the approach taken by CORS Toggle) because Access-Control-Allow-Origin: * is not allowed on requests that use credentials (the common case for APIs).
View the source code on GitHub: https://github.com/mking-clari/disable-cors