I'm working on a Google Chrome extension for site A that displays data from site B (example.com) for each page. When I try to do:
fetch('example.com')
In my Chrome extension with this in my manifest.json:
"permissions": [
"*://example.com/*"
],
"host_permissions": [
"*://example.com/*",
]
I still get this error:
Access to fetch at 'https://example.com/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Is it possible to tell Chrome to let me make CORS requests from the extension or is there no special permission for extensions? Do I have to host a proxy? I have no control over either site.