forked from baron/baron-sso
fix(userfront-e2e): fix widespread test failures in non-Chromium browsers
- Add COOP/COEP headers to serve script for Flutter WASM compatibility (SharedArrayBuffer) - Update CI workflow to install all Playwright browsers for userfront-e2e - Fix command reporting consistency in adminfront test script
This commit is contained in:
@@ -81,6 +81,12 @@ const server = createServer((req, res) => {
|
||||
res.setHeader('Last-Modified', stats.mtime.toUTCString());
|
||||
res.setHeader('Cache-Control', cacheControl);
|
||||
res.setHeader('Vary', 'Accept-Encoding');
|
||||
|
||||
// Flutter WASM requires SharedArrayBuffer which needs these COOP/COEP headers
|
||||
// to be cross-origin isolated in most modern browsers (WebKit, Firefox, etc.)
|
||||
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
|
||||
res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
|
||||
|
||||
if (servedPath === brotliPath) {
|
||||
res.setHeader('Content-Encoding', 'br');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user