OPTIONS Request Method Unauthorized 401
-
After installing and activating the cors extension in the chrome browser, restapi is being authenticated using the apikey method.
However, in the browser, when the get method is called, the options method is automatically called.
But 401 unauthorized processing in the options request.
On the other hand, it works fine with using curl.Why can’t authentication process in options request?
this is my .htaccess file
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] RewriteCond %{REQUEST_METHOD} OPTIONS RewriteRule ^(.*)$ $1 [R=200,L] RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
Even when I disable this plugin
An options request also occurs, but it works.
I have all the cors settings done.My guess is that this plugin is not able to process authentication on options request.
How to fix it? my .htaccess value correct?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘OPTIONS Request Method Unauthorized 401’ is closed to new replies.