Origin http://localhost is not allowed by Access-Control-Allow-Origin

I had a frustrating day. I’m writing some simple ajax/xhr tests, and I can’t get the browser to issue my requests:

Origin http://localhost is not allowed by Access-Control-Allow-Origin

Searching on Google, it’s clear that lots of other people are having the same problem, but nobody has an answer – the browser nazis are being overzealous, protecting us from localhost – really?

Fortunately, chrome has a workaround. Use this commandline:

chrome.exe –disable-web-security

And you can get your job done.

One thought on “Origin http://localhost is not allowed by Access-Control-Allow-Origin

  • January 26, 2012 at 3:52 pm
    Permalink

    You use Windows? I thought you were a Mac guy.

    Reply

Leave a Reply

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