XMLHttpRequest cannot load … No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access.

Problem

XMLHttpRequest cannot load … No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access.

 

Solution

This is due to CORS; which could be due to:

  • server-side restrictions (which you can change either in config; or by setting the proper response headers
  • client-side restrictions: which you can temporarily disable by launching your browser with (ref) on linux:
    • on linux
      • chromium-browser --disable-web-security
    •  on mac:
      • open -a Google\ Chrome --args --disable-web-security

You might need to allow CORS from the AWS side as well: e.g. : http://docs.aws.amazon.com/AmazonS3/latest/UG/EditingBucketPermissions.html

 

Keywords:

 

Searched for XMLHttpRequest No Access-Control-Allow-Origin header is present on the requested resource local angular 9:26pm
  ruby on rails – No ‘Access-Control-Allow-Orig… – stackoverflow.com 9:26pm
  angularjs – Angular.js No ‘Access-Control-All… – stackoverflow.com 9:26pm
  javascript – XMLHttpRequest No ‘Access-Contro… – stackoverflow.com 9:26pm
  No ‘Access-Control-Allow-Origin’ header… – stackoverflow.com 9:26pm
  REST service No ‘Access-Control-Allow-Origin’… – github.com 9:26pm
Searched for XMLHttpRequest No Access-Control-Allow-Origin header is present on the requested resource local 9:25pm
  cors – javascript No ‘Access-Control-Allow-Or… – stackoverflow.com 9:22pm
  Working With and Around the Same-Origin… – sitepoint.com 9:23pm
  No ‘Access-Control-Allow-Origin’ header… – github.com 9:25pm
  Cross-Domain requests in Javascript | jvaneyck – wordpress.com 9:25pm
Searched for XMLHttpRequest No Access-Control-Allow-Origin header is present on the requested resource 9:21pm
  javascript – “No ‘Access-Control-Allow-Origin… – stackoverflow.com 9:21pm
  javascript – XMLHttpRequest cannot load…. – stackoverflow.com 9:21pm
  javascript – No ‘Access-Control-Allow-Origin’… – stackoverflow.com 9:22pm

 

 

 

About Neil Rubens

see http://ActiveIntelligence.org

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*