kindspells/astro-shield

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

Closed this issue · 1 comments

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.

This was documented a while ago.