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

document corner case where cross-origin resources are statically imported instead of just included #57

Open
castarco opened this issue Mar 30, 2024 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers sri SubResource Integrity

Comments

@castarco
Copy link
Contributor

When <script> elements referring to cross-origin resources do not include the type="module" annotation or the integrity attribute, Astro/Vite might decide to create a new module that imports the original resource, instead of leaving the original reference.

This can be problematic because of how the CSP script-src is constructed. While we look for a more permanent and solid workaround, this problem should be properly documented in the documentation site.

@castarco castarco added bug Something isn't working documentation Improvements or additions to documentation sri SubResource Integrity good first issue Good for newcomers labels Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers sri SubResource Integrity
Projects
None yet
Development

No branches or pull requests

1 participant