SW not working with cross origin headers (sharedArrayBuffers)
Sceat opened this issue · 1 comments
Sceat commented
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