Headers not working in frame

Godot Version

4.2.2

Question

I’m publishing my game in nodejs and that works fine. I configure my headers in my middleware;

app.use(function(req, res, next) {
  res.header("Cross-Origin-Embedder-Policy", "require-corp");
  res.header("Cross-Origin-Opener-Policy", "same-origin");
  next();
});

I upload my game folder to public folder. I can play game from my there, my-backend:3000/public/games/game-1/index.html.

But when I’m trying to frame it to my client-side, it’s not working. I got SharedArrayBuffer error;

The following features required to run Godot projects on the Web are missing:
Cross Origin Isolation - Check web server configuration (send correct headers)
SharedArrayBuffer - Check web server configuration (send correct headers)

I try to set header in client-side (vite.config.js);

export default defineConfig({
  ...
  server: {
    headers: {
      'Cross-Origin-Embedder-Policy': 'require-corp',
      'Cross-Origin-Opener-Policy': 'same-origin'
    }
  }
})

But also not working, I can’t frame it. How can I solve it, is there any solution for this?

Hello,
I am currently encountering a similar issue. If you have managed to resolve it, I would greatly appreciate it if you could kindly share the solution.