Top "Cors" questions

Use this tag when you see a message in the browser devtools console about CORS (Cross-Origin Resource Sharing) — e.g., your browser logged an error about Access-Control-Allow-Origin, and you want to know how to eliminate the error.

CORS request not working in Safari

I am making a CORS xhr request. This works fine in chrome, however when I run in safari I get …

javascript safari xmlhttprequest cors
Allow CORS REST request to a Express/Node.js application on Heroku

I've written a REST API on the express framework for node.js that works for requests from the js console …

node.js rest heroku express cors
Disable Spring Security for OPTIONS Http Method

Is it possible to disable Spring Security for a type of HTTP Method? We have a Spring REST application with …

java spring spring-mvc spring-security cors
CORS error on same domain?

I'm running into a weird CORS issue right now. Here's the error message: XMLHttpRequest cannot load http://localhost:8666/routeREST/select?…

javascript python ajax cross-domain cors
How to enable CORS in Nginx proxy server?

As my title, here is the config file located in conf.d/api-server.conf server { listen 80; server_name api.localhost; …

node.js nginx cors reverse-proxy
Refused to set unsafe header "Origin" when using xmlHttpRequest of Google Chrome

Got this error message: Refused to set unsafe header "Origin" Using this code: function getResponse() { document.getElementById("_receivedMsgLabel").innerHTML += "getResponse() …

ajax xmlhttprequest comet cors
How to resolve 'preflight is invalid (redirect)' or 'redirect is not allowed for a preflight request'

I have followed this step to setup my server to enable CORS. https://docs.microsoft.com/en-us/aspnet/web-api/overview/…

cors preflight
Access to XMLHttpRequest has been blocked by CORS policy

I've a problem when I try to do PATCH request in an angular 7 web application. In my backend I have: …

angular cors angular7
Chrome cancels CORS XHR upon HTTP 302 redirect

It looks like according to the CORS Spec, GET and POST requests should transparently follow 302 redirects. But Chrome is canceling …

google-chrome redirect xmlhttprequest cors .net-internals
fetch() unexpected end of input

I am using fetch() to grab data from api server. My error looks like this: Uncaught (in promise) SyntaxError: Unexpected …

javascript json cors fetch-api