401 authenticate error
-
hello, I installed the plugin in wordpress and in the protected pages the options call returns a 401.
I make the calls in this way:
const response = await fetch(ruta_api, { method:'GET', headers:{ //'authorization': 'Bearer ' + token, authorization: 'Basic cm9pc2Nyb2xsOmQzczRycjBsbDAu', } });
And this is the htaccess
Header set Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, PATCH, DELETE" Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Credentials "true" Header set Access-Control-Allow-Headers "X-Accept-Charset,X-Accept,Content-Type,Credentials"
And this is the response
Estado 401 Unauthorized VersiónHTTP/2 Transferido460 B (tama?o 0 B) Política de referenciastrict-origin-when-cross-origin access-control-allow-credentials true access-control-allow-headers X-Accept-Charset,X-Accept,Content-Type,Credentials access-control-allow-methods POST, GET, PUT, OPTIONS, PATCH, DELETE access-control-allow-origin * content-type application/json; charset=UTF-8 date Fri, 24 Feb 2023 10:21:43 GMT server nginx strict-transport-security max-age=15768000; includeSubDomains X-Firefox-Spdy h2 x-powered-by PHP/8.1.16 Accept */* Accept-Encoding gzip, deflate, br Accept-Language es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 Access-Control-Request-Headers authorization Access-Control-Request-Method GET Connection keep-alive Host roiscroll.dev Origin http://rs.test:3000 Referer https://rs.test:3000/ Sec-Fetch-Dest empty Sec-Fetch-Mode cors Sec-Fetch-Site cross-site User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘401 authenticate error’ is closed to new replies.