Skip to content

[Issue] Allow to load base64 encoded images and fonts #31170

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #31162: Allow to load base64 encoded images and fonts


Description

Magento 2.4-develop

Current Content Security Policy setup doesn't allow to load images and fonts via data: scheme which is quite a popular method to load local resources (base64 encoded images). Additionally, it's used internally by the browser cache (Chrome) when you refresh the page.

Manual testing scenarios (*)

  1. Add Base64 image or font to Home page
  2. Open Luma homepage and open browser console.
  3. Refresh the page to trigger resource loading from the browser cache.
  4. Inspect errors in the console:

Font errors in console

5. Apply the patch, and try again. No errors should appear in the log.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

Labels

Component: CspFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions