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

CORP header missing in instructions how to test web extensions #7845

Open
VitGottwald opened this issue Dec 9, 2024 · 1 comment
Open

CORP header missing in instructions how to test web extensions #7845

VitGottwald opened this issue Dec 9, 2024 · 1 comment
Assignees
Labels
doc-enhancement suggested addition or improvement

Comments

@VitGottwald
Copy link

VitGottwald commented Dec 9, 2024

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.

Image

@ntrogh ntrogh self-assigned this Dec 12, 2024
@ntrogh ntrogh added the doc-enhancement suggested addition or improvement label Dec 12, 2024
@ntrogh
Copy link
Contributor

ntrogh commented Dec 12, 2024

@joyceerhl Can you take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement suggested addition or improvement
Projects
None yet
Development

No branches or pull requests

4 participants