Append the base URL infront of the API endpoint and perform the request as usual. The request will be passed through the proxy to get the response. CO

das-jishu / add-cors

submited by
Style Pass
2021-07-05 05:00:05

Append the base URL infront of the API endpoint and perform the request as usual. The request will be passed through the proxy to get the response. CORS headers will be added to the response and sent back.

Note that it is a public proxy with rate limiting applied, so responses might be delayed. A better approach would be to create your own proxy server to handle the requests. This can be done with the following commands:

After executing the above commands, your own server would be running and available at https://cors-everywhere.herokuapp.com/ You can make requests to endpoints simply by attaching the URL infront of it.

Leave a Comment
Related Posts