title: CORS preflight request doesn't pass access control check: It does not have HTTP ok status
body: <p>I am trying to make a GET/POST Request to my Wordpress REST API using Authorization Headers but in response i am getting </p>
  
  <p>preflight request doesn't pass access control check: It does not have HTTP ok status.</p>
  
  <p>I am using JWT Authentication for WP-API for Authentication and tried almost every possible option found on the internet but no luck.</p>
  
  <p>Have a look at my current .htaccess configurations</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  RewriteCond %{HTTP:Authorization} ^(.*)
  RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
  SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
  
  RewriteCond %{REQUEST_METHOD} OPTIONS
  RewriteRule ^(.*)$ $1 [R=200,L]
  
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_headers.c&gt;
    Header always set X-Content-Type-Options "nosniff"
    &lt;IfModule mod_setenvif.c&gt;
      SetEnvIf Origin "^(http://localhost:3000)$" CORS=$0
    &lt;/IfModule&gt;
    Header set Access-Control-Allow-Origin %{CORS}e env=CORS
    Header set Access-Control-Allow-Credentials "true" env=CORS
    Header set Access-Control-Allow-Methods "GET, POST, OPTIONS, HEAD" env=CORS
    Header set Access-Control-Allow-Headers "*" env=CORS
    Header set Access-Control-Expose-Headers "*" env=CORS
    &lt;FilesMatch "\.(php|html)$"&gt;
    &lt;/FilesMatch&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I am getting this error when the request is made from axios</p>
  
  <p>Access to XMLHttpRequest at 'HIDDEN_SERVER_ADDRESS' from origin '<a href="http://localhost:3000" rel="noreferrer">http://localhost:3000</a>' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.</p>
  
  <p>In PostMan the calls are working fine and giving desired results.</p>