Solution: Chrome - No 'Access-Control-Allow-Origin' header is present on the requested resource.

I was getting the following error testing an application using chrome:

XMLHttpRequest cannot load http://stackoverflow.com/feeds. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

The following steps will work around this issue.

 


retroman80s | 11/6/2015 2:53:37 AM | 1168 views
Steps
  • Step 1: Close all instances of Chrome including open instances in task manager 
    Step 1: Close all instances of Chrome including open instances in task manager

    *** Close all Chrome browsers, then open up task manager and kill all instances of Chrome.

  • Step 2: Create a Chrome shortcut and add --disable-web-security 
    Step 2: Create a Chrome shortcut and add --disable-web-security


    I've created a shortcut to save time, edit the shortcut properties and added the following extra parameter to the end of the target command:

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security



    If you don't want to create a shortcut, then just open up a dos prompt window and execute the following line:

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security

  • Sponsors

 

© Copyright ©2019 FunkyList.com (v2.0) All rights reserved.