title: Sec-Fetch-Mode instead of Preflight
body: <p>I created login FE and finished it.
  And as per usual my goto for ajax was Axios. My code is as follows.</p>
  
  <pre><code>const baseUrl = http://localhost:5000/project/us-central1/api
  
  Axios.post(
   `${baseUrl}/v1/user/login`,
   { ...data },
   {
    headers: {
     Authorization: 'Basic auth...'
    }
   },
  ).then(r =&gt; console.log(r).catch(e =&gt;console.log(e));
  </code></pre>
  
  <p>Now when i try to send request to my local firebase cloud function.
  I get a 400 bad request.</p>
  
  <p><a href="https://i.stack.imgur.com/QJ9eU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QJ9eU.png" alt="response"></a></p>
  
  <p>after checking the request, I was wondering why it wasn't sending any preflight request, which it should do(to the best of my knowledge) but instead I saw a header named <code>Sec-Fetch-Mode</code>. I searched anywhere it's a bit abstract. And I can't seem to figure anything why my request still fails.</p>
  
  <p>Is there anything Im missing in my config of <code>axios</code>?</p>
  
  <p>My FE is running on a <strong>VSCode Plugin</strong> named <code>live server(http://127.0.0.1:5500)</code></p>
  
  <p>Also, my firebase cloud function has enabled <code>cors</code></p>
  
  <pre><code>// cloud function expres app
  cors({
   origin: true
  })
  </code></pre>
  
  <p>Any insights would be very helpful.</p>