Toma Tomov
Toma Tomov

Reputation: 1694

Multiple values in Access control header

I know there a lot similar question here and none of them was helpful. What I am using in my htaccess is:

Header set Access-Control-Allow-Origin "*"

Yet when I try to make a request from other site to my server I get the error:

Access to fetch at 'https://mydomain/api/path' from origin 'https://guestdomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values 'https://guestdomain.com, *', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Upvotes: 0

Views: 11

Answers (0)

Related Questions