D
D
driverx182019-09-26 12:48:39
CORS
driverx18, 2019-09-26 12:48:39

How to solve CORS issues in Apache?

There is a problem:

Access to XMLHttpRequest at ... from origin ' localhost:8080 ' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Nothing helped here . Added to httpd.conf - did not help. (Apache of course restarted). In theory, problems with CORS should be solved at the web server level (as I understand it). Who knows how to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2019-09-26
@xmoonlight

The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.
Change the mask from * (asterisks) to the domain.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question