title: 304 ERR_BLOCKED_BY_RESPONSE for web worker file after enabling same-origin CORS to allow SharedArrayBuffer
body: <p>I'm looking to do some multithreading for my web application to improve performance and I've stumbled upon a head-scratcher. I'm currently developing on localhost (vite server) on Chrome.</p>
  <p>Basically I have spawned a web worker. Then I created a SharedArrayBuffer.</p>
  <p>At first, the SharedArrayBuffer was getting an error that it wasn't defined. I found out it is disabled unless you specify that you only want to allow same-origin on cors. So I added these headers to my vite server:</p>
  <pre><code>        'Cross-Origin-Embedder-Policy': 'require-corp',
          'Cross-Origin-Opener-Policy': 'same-origin',
  </code></pre>
  <p>It solved the problem with SharedArrayBuffer. But then, I started getting 304 errors for my worker</p>
  <pre><code>GET http://localhost:5001/js/searchWorker.js net::ERR_BLOCKED_BY_RESPONSE 304
  </code></pre>
  <p>If I allow cross origin with a wildcard, the web worker works, but the shared array buffer does not. And vice versa. I don't really understand as well because shouldn't it allow searchWorker.js because it's at the same origin (localhost)?</p>
  <p>I don't really understand how to fix this issue!</p>
  <p>Thanks!</p>