0

recently stumbled across a CORS error when debugging my first Chrome extension. I looked through a couple of articles and was recommended to create a proxy.

i basically followed this site to host my proxy server on heroku.

however, it fixed the issue for some sites, but occasionally, i still get a CORS error

I would like to know why this happens and what I can do to resolve it.

const proxy = "https://proxy_from_heroku.herokuapp.com/";
const response = await fetch(proxy + some_link);

I tried creating my own proxy server and hosting it on Heroku. I expected CORS error to simply go away but that is not the case. In some cases, I avoid the CORS error when it previously gave me one but in other cases, I still get CORS error.

Tyler Le
  • 51
  • 1
  • 2
  • 8
  • Is this in a content script? If so, the reason is explained in [this thread](https://stackoverflow.com/questions/55214828/how-to-make-a-cross-origin-request-in-a-content-script-currently-blocked-by-cor). If not, you need to add the site to your `host_permissions` in manifest.json. – wOxxOm Mar 28 '23 at 19:54

0 Answers0