Answer the question
In order to leave comments, you need to log in
Request for another domain?
How many have not encountered problems all the time and something does not work with these cross-domain requests.
This time the POST request to the server does not work.
I send a post request from the Client to the JS, on the server I registered everything that I found, namely:
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token');
header('Access-Control-Allow-Methods: GET, POST');
header('Access-Control-Allow-Credentials: true');
XMLHttpRequest cannot load https://xxx.com/app/auth. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question