17

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.

Swift Try
  • 171
  • 1
  • 1
  • 3
  • 3
    possible duplicate of [Access-Control-Allow-Origin on chrome extension](http://stackoverflow.com/questions/7056156/access-control-allow-origin-on-chrome-extension) – rsanchez Nov 22 '13 at 22:22
  • Thank you, rsanchez, adding a global permission worked! – Swift Try Nov 22 '13 at 22:32
  • possible duplicate of [Cross-Origin XMLHttpRequest in chrome extensions](http://stackoverflow.com/questions/9421933/cross-origin-xmlhttprequest-in-chrome-extensions) – hopper Jul 24 '14 at 04:16

1 Answers1

37

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.

Ruwanka De Silva
  • 3,555
  • 6
  • 35
  • 51