CORP header missing in instructions how to test web extensions
Test your web extension in vscode.dev needs one extra step to properly serve web extensions from localhost. The Cross-Origin-Resource-Policy: cross-origin header is required. This can be added by creating a serve.json:
cat > serve.json << EOF
{
"headers": [
{
"source": "**/*",
"headers": [
{
"key": "Cross-Origin-Resource-Policy",
"value": "cross-origin"
}
]
}
]
}
EOF
Without the CORP header the extension icon and other resources do not load.
For example our HLASM extension which runs in web workers and requires SharedArrayBuffer to function does not start at all without this extra header.
@joyceerhl Can you take a look at this?
Bonsoir mon frère svp je veut m'exercer avec ce code
I also opened an issue with serve with a suggested fix on their side https://github.com/vercel/serve/issues/817 .
@joaomoreno Can you take a look at this proposed fix?