79305393

Date: 2024-12-24 10:59:41
Score: 0.5
Natty:
Report link

The most upvoted answer is the right approach of sending the request through CORS proxy. However, since Heroku no longer offers a free tier, the deployment part is a little bit outdated.

For a 2024 solution, you can host a CORS proxy yourself with Cloudflare Worker free tier using this repository: https://github.com/Zibri/cloudflare-cors-anywhere

However, be aware that there are daily requests limits when using Cloudflare Worker, so depending on your use case it might not be suitable for production use.

If you are looking for a production ready CORS proxy, you can check out Corsfix, it has unlimited monthly requests and supports request header overrides.

Here is an example of how to send request through the CORS proxy

fetch("https://proxy.corsfix.com/?<TARGET_URL>"); 

(I am affiliated with Corsfix)

Reasons:
  • Blacklisted phrase (0.5): upvote
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: reynaldi