Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SW not working with cross origin headers (sharedArrayBuffers) #709

Open
Sceat opened this issue May 4, 2024 · 1 comment
Open

SW not working with cross origin headers (sharedArrayBuffers) #709

Sceat opened this issue May 4, 2024 · 1 comment

Comments

@Sceat
Copy link

Sceat commented May 4, 2024

Using this vercel config (basically enabling the headers to access SharedArrayBuffers), makes it impossible to use the service worker somehow.

"headers": [
    {
      "source": "/(.*)",
      "headers": [
        {
          "key": "Cross-Origin-Embedder-Policy",
          "value": "require-corp"
        },
        {
          "key": "Cross-Origin-Opener-Policy",
          "value": "same-origin"
        }
      ]
    }
  ],

It registers but then throws:

uncaught (in promise) TypeError: Type error sw.js:1
@userquin
Copy link
Member

userquin commented May 4, 2024

@Sceat provide minimal reproduction (and context 🙏 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants