All Questions

1650
votes
34answers
2693960 views

Why does my JavaScript get a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error when Postman does not?

I am trying to do authorization using JavaScript by connecting to the RESTful API built in Flask. However, when I make the request, I get the following error: XMLHttpRequest cannot load http://myA...
27
votes
6answers
12088 views

XMLHttpRequest cannot load https://www.[website].com/

I have a Grunt process which initiates an instance of express.js server. This was working absolutely fine up until just now when it started serving a blank page with the following appearing in the err...
703
votes
11answers
995285 views

How does Access-Control-Allow-Origin header work?

Apparently, I have completely misunderstood its semantics. I thought of something like this: A client downloads javascript code MyCode.js from http://siteA - the origin. The response header of MyCod...
488
votes
16answers
663490 views

XmlHttpRequest error: Origin null is not allowed by Access-Control-Allow-Origin

I'm developing a page that pulls images from Flickr and Panoramio via jQuery's AJAX support. The Flickr side is working fine, but when I try to $.get(url, callback) from Panoramio, I see an error in ...
101
votes
8answers
208191 views

Loading cross-domain endpoint with jQuery AJAX

I'm trying to load a cross-domain HTML page using AJAX but unless the dataType is "jsonp" I can't get a response. However using jsonp the browser is expecting a script mime type but is receiving "text...
442
votes
17answers
349144 views

How to allow CORS?

I am trying to support CORS in my Node.js application that uses the Express.js web framework. I have read a Google group discussion about how to handle this, and read a few articles about how CORS wor...
158
votes
8answers
368108 views

How to get a cross-origin resource sharing (CORS) post request working

I have a machine on my local lan (machineA) that has two web servers. The first is the in-built one in XBMC (on port 8080) and displays our library. The second server is a CherryPy python script (po...
75
votes
8answers
125876 views

CORS with php headers

I have a simple PHP script that I am attempting a cross-domain CORS request: <?php header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Headers: *"); ... Yet I still get the er...
86
votes
2answers
212393 views

No 'Access-Control-Allow-Origin' header is present on the requested resource—when trying to get data from a REST API

I'm trying to fetch some data from the REST API of HP Alm. It works pretty well with a small curl script - I get my data. Now doing that with JavaScript, fetch and ES6 (more or less) seems to be a bi...
111
votes
5answers
281230 views

How to enable CORS in AngularJs

I have created a demo using JavaScript for Flickr photo search API. Now I am converting it to the AngularJs. I have searched on internet and found below configuration. Configuration: myApp.config(...

Previous Next