Swift Try
Swift Try

Reputation: 171

"No 'Access-Control-Allow-Origin' header is present on the requested resource."

I already tried looking for various questions, but that didn't help/I am too inexperienced to understand, so I have to be specific. This is what I get in the console:

XMLHttpRequest cannot load https://a.websight.com/file/hex.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'chrome-extension://asdfghetcetcetc' is therefore not allowed access. (index):1

It's breaking my entire extension and I don't know how to fix it. I would appreciate any help.

Upvotes: 17

Views: 26076

Answers (1)

Ruwanka De Silva
Ruwanka De Silva

Reputation: 3755

Although question is quite old, I found that google developer site provide easy way to remember global kind of permission. If you want to make cross origin ajax requests in any where you can add "permissions": ["<all_urls>"] to the manifest. Or else you can use matching patterns which are described in here.

Upvotes: 37

Related Questions