w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
XMLHttpRequest cannot load . No 'Access-Control-Allow-Origin' header is present on the requested resource

If you using AngularJS<1.2 you need to delete the 'X-Requested-With' header and set useXDomain to true in order to make it work

yourModule
  .config(function($httpProvider){
    $httpProvider.defaults.useXDomain = true;
    delete $httpProvider.defaults.headers.common['X-Requested-With'];
});

otherwise this is not required in higher versions. The server needs to setup with the crossDomain stuff i.e. the instagram one (and not your local server)





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.