I use this in the htaccess file to enable cross-domain queries:
Set of Access-Control-Allow-Origin Headers "*"
The problem is that when I try to use jquery to load a query, I get the following error:
Access XMLHttpRequest at the address & # 39; https: // **** / wp-json / wp / v2 / restaurant? Statuses = public & per_page = 5 & page = 1 & # 39; since the beginning http: // localhost & # 39; was blocked by the CORS policy: The & # 39; The Access-Control-Allow-Origin header contains multiple values & # 39; http: // localhost, * & # 39; but only one is allowed.
I've checked, there are no multiple values, only "*". Even verified with an external site (this: https://www.webconfs.com/http-header-check.php), he gives me these:
HTTP / 1.1 200 OK => Date => Thu, Jun 13, 2019 19:44:42 GMT Server => Apache X-Robots-Tag => noindex X-Content-Type-Options => nosniff Access Control Headers => X-WP-Total, X-WP-TotalPages Access-Control-Allow-Headers => Authorization, Content Type X-WP-Total => 20 X-WP-TotalPages => 4 Link =>; rel = "next" Allow => GET Set-Cookie => _icl_current_language = en; Expires = Fri, 14-Jun-2019 19:44:42 GMT; Max Age = 86400; path = / demo / themes / Cache-Control => max-age = 0 Expires => Thu, 13 Jun 2019 19:44:42 GMT Vary => Accept-Encoding, User-Agent Connection => keep alive, close Access-Control-Allow-Origin => * Content-Type => application / json; character set = UTF-8
Authorized access control is only a value, so what is it?