Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Open
ThomasLandauer wants to merge1 commit intosymfony:6.4
base:6.4
Choose a base branch
Loading
fromThomasLandauer:patch-12
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletionsfrontend/asset_mapper.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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 a special importmap
entry for each CSS file. These special entries are valid, but do nothing.
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'``.
Copy link

CopilotAISep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

[nitpick] The phrase 'lower the rule' is unclear and potentially confusing. Using 'strict-dynamic' is not necessarily 'lowering' security - it's a different security model. Consider rephrasing to 'change the rule to' or 'use' instead of 'lower the rule to'.

Suggested change
ignore the error, orlower the rule to ``script-src 'strict-dynamic'``.
ignore the error, orchange the rule to ``script-src 'strict-dynamic'``.

Copilot uses AI. Check for mistakes.

.. _asset-mapper-3rd-party-css:

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp