0

The error I'm getting is

XMLHttpRequest cannot load [url]. The 'Access-Control-Allow-Origin' header has a value '[url]' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access.

NOTE: I run this on the [url]'s page in console. What can I do to fix this? I've also tried all of the other methods I read online.

If you need me to post code, here it is: http://hastebin.com/urivabokob.js

  • " I run this on the [url]'s page in console. " — If you did that, then it would have the origin `[url]` and not `null` (which indicates you ran it on a page loaded from your local drive). – Quentin Apr 15 '16 at 10:30
  • I do run it in console on Google Chrome. Perhaps subdomains effect cross-domain even though the base domain hasn't changed? – Logan Richey Apr 15 '16 at 10:32
  • There is a reason that the error message uses the term "Origin" and not "Domain". https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Definition_of_an_origin – Quentin Apr 15 '16 at 10:33

0 Answers0