Chrome does not support localhost for CORS requests (a bug opened in 2010, marked WontFix in 2014).
To get around this you can use a domain like localho.st
(which points at 127.0.0.1 just like localhost) or start chrome with the --disable-web-security
flag (assuming you’re just testing).
More Related Contents:
- AngularJS: No “Access-Control-Allow-Origin” header is present on the requested resource [duplicate]
- “Origin null is not allowed by Access-Control-Allow-Origin” error for request made by application running from a file:// URL
- Origin is not allowed by Access-Control-Allow-Origin
- How to enable CORS in AngularJs
- Origin null is not allowed by Access-Control-Allow-Origin
- enabling cross-origin resource sharing on IIS7
- No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘…’ is therefore not allowed access
- Why am I seeing an “origin is not allowed by Access-Control-Allow-Origin” error here? [duplicate]
- AngularJS Error: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https
- A CORS POST request works from plain JavaScript, but why not with jQuery?
- Why am I seeing an “origin is not allowed by Access-Control-Allow-Origin” error here? [duplicate]
- document.write() overwriting the document?
- Is it possible to trap CORS errors?
- Understanding XMLHttpRequest over CORS (responseText)
- Catching an Access-Control-Allow-Origin error in JavaScript
- CORS request not working in Safari
- Cannot access cssRules from local css file in Chrome 64
- Get HTML code using JavaScript with a URL
- JavaScript innerHTML is not working for IE?
- How to Detect Cross Origin (CORS) Error vs. Other Types of Errors for XMLHttpRequest() in Javascript
- Microsoft Edge blocked cross-domain requests sent to IPs in same private network CIDR
- Why cookies and set-cookie headers can’t be set while making xmlhttprequest using setRequestHeader?
- Determine if an HTML element’s content overflows
- Page content is loaded with JavaScript and Jsoup doesn’t see it
- Capture iframe load complete event
- What is the best way to parse html in google apps script
- Selecting multiple from an html select element without using ctrl key
- Anchor tag download attribute not working :Bug in Chrome 35.0.1916.114
- No sound on iOS 6 Web Audio API
- find words in html page with javascript