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).
Related Posts:
- Get HTML code using JavaScript with a URL
- Origin null is not allowed by Access-Control-Allow-Origin
- How to enable CORS in AngularJs
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- No ‘Access-Control-Allow-Origin’ header is present on the requested resource—when trying to get data from a REST API
- How does Access-Control-Allow-Origin header work?
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Maximum call stack size exceeded error
- How to properly use jsPDF library
- Cross-Origin Read Blocking (CORB)
- How do I link a JavaScript file to a HTML file?
- Edit webpage with javascript trick – how to “unedit”?
- Can I use complex HTML with Twitter Bootstrap’s Tooltip?
- Google Chrome Uncaught (in promise) DOMException while playing AUDIO
- Cross-Origin Read Blocking (CORB)
- How to make a word underline in Markdown
- ChartJS beginAtZero, min, max doesn’t work
- How do I check whether a checkbox is checked in jQuery?
- how to fix : ” TypeError: Cannot read property ‘addEventListener’ of null”…?//
- Cannot set property InnerHTML of null [duplicate]
- ReferenceError: $ is not defined
- How to fix “Cannot read property ‘addEventListener’ of null” error [duplicate]
- React.js: Set innerHTML vs dangerouslySetInnerHTML
- How do I check whether a checkbox is checked in jQuery?
- jQuery document.createElement equivalent?
- (Google Map API) Geocode was not successful for the following reason: REQUEST_DENIED
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- How to make a word underline in Markdown
- Pure JavaScript equivalent of jQuery’s $.ready() – how to call a function when the page/DOM is ready for it [duplicate]
- How to play audio?
- Automatically pausing html5 video as the ‘next’ button is pressed (javascript/ jquery)
- How to play audio?
- Is it possible to write data to file using only JavaScript?
- How to read a local text file?
- Optimum way to compare strings in JavaScript?
- How can I scroll to an element using jQuery?
- jQuery.click() vs onClick
- jQuery Get Selected Option From Dropdown
- Remove CSS class from element with JavaScript (no jQuery) [duplicate]
- Include another HTML file in a HTML file
- Is it possible to write data to file using only JavaScript?
- How to read a local text file?
- Check if checkbox is checked with jQuery
- How to make JavaScript execute after page load?
- Set cookie and get cookie with JavaScript
- Add swipe left/right to web page, but use default swipe up/down
- How to add jQuery code into HTML Page
- How can I get the data-id attribute?
- Check if checkbox is checked with jQuery
- Which is better: or
- Onclick javascript to make browser go back to previous page?
- How to resolve the C:\fakepath?
- How to make JavaScript execute after page load?
- What is the meaning of == $0 that is shown in inspect element of google chrome for the selected element [duplicate]
- Why is my Javascript not working?
- Angular: mat-form-field must contain a MatFormFieldControl
- Which HTML Parser is the best?
- (change) vs (ngModelChange) in angular
- Pure JavaScript Send POST Data Without a Form
- Bootstrap Dropdown menu is not working
- HTTP Status 405 – Request method ‘POST’ not supported (Spring MVC)
- jquery SlideToggle effect in upward direction?
- Change Background color (css property) using Jquery
- How can I get the values of data attributes in JavaScript code?
- Response to preflight request doesn’t pass access control check
- Failed to load resource: net::ERR_FILE_NOT_FOUND loading json.js
- Get class name using jQuery
- How to clear the canvas for redrawing
- Javascript: getElementById vs getElementsById (both works on different pages)
- Adding options to select with javascript
- JavaScript runtime error: ‘$’ is undefined
- Export html table data to Excel using JavaScript / JQuery is not working properly in chrome browser
- Send POST data using XMLHttpRequest
- Set timeout for ajax (jQuery)
- How does the data-toggle attribute work? (What’s its API?)
- CSS height 100% percent not working
- mailto using javascript
- mailto using javascript
- Mailto using Javascript?
- How can I upload files asynchronously with jQuery?
- How to change css property using javascript
- JavaScript get element by name
- Use images like checkboxes
- javascript close current window
- How to read xml file contents in jQuery and display in html elements?
- HTML5 Local storage vs. Session storage
- JavaScript Loading Screen while page loads
- XMLHttpRequest cannot load XXX No ‘Access-Control-Allow-Origin’ header
- Completely disable scrolling of webpage
- TypeError: Cannot Set property ‘onclick’ of null
- Express Render not working return error: No default engine was specified and no extension was provided
- How do I scroll to an element using JavaScript?
- Jquery swipe left or right on mobile
- Programmatically change the src of an img tag
- display variable image using cookies
- How to move an element into another element?
- Bootstrap Dropdown menu is not working
- Access-Control-Allow-Origin Multiple Origin Domains?
- character counter – backspace doesn’t reflect on characters remaining