Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[AssetMapper] Adding CSP details, recommendingscript-src 'strict-dynamic'#21356
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:6.4
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -476,10 +476,14 @@ the page as ``link`` tags in the order they were imported. | ||||||
| .. note:: | ||||||
| Importing a CSS file is *not* something that is natively supported by | ||||||
| JavaScript modules. AssetMapper makes this work by adding an empty importmap | ||||||
| entry for each CSS file, e.g. ``"/assets/app.css": "data:application/javascript,",``. | ||||||
| These special entries are valid, but do nothing. | ||||||
| AssetMapper adds a ``<link>`` tag for each CSS file, but when JavaScript | ||||||
| executes the ``import`` statement, nothing additional happens. | ||||||
| When using a **Content-Security-Policy** with ``script-src 'self'``, this | ||||||
| will trigger an error because of the ``data:`` URL. You can either just | ||||||
| ignore the error, or lower the rule to ``script-src 'strict-dynamic'``. | ||||||
CopilotAI | ||||||
| ignore the error, orlower the rule to ``script-src 'strict-dynamic'``. | |
| ignore the error, orchange the rule to ``script-src 'strict-dynamic'``. |