I have a website and my REST api server.
I do ajax post request to the REST server to create new model. Answer for this request will be "HTTP/1.1 201 Created" response with header "Location: http://myapi.com/some/path/111"
But I get error message Refused to get unsafe header "Location"
. I know that this is because of cross domain access policy and other bla bla bla.
Does anybody knows how to fix it? Maybe I have to add "Access-Controll-Allow-SOMETHINGHERE" header to the response?
UPD:
Web site URL http://www.mydomain.com/
Original URI is http://api.mydomain.com/model/ and new Location URI is http://api.mydomain.com/model/211
Original URI is used for ajax POST request, which responses with new Location header.