Project

General

Profile

Actions

Task #104141

closed

Add request object to \TYPO3\CMS\Core\Security\ContentSecurityPolicy\Event\PolicyMutatedEvent

Added by Josef Glatz 12 days ago. Updated 3 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Content Security Policy
Target version:
Start date:
2024-06-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Proposal

It would be a real benefit if the event listener gets the ServerRequestInterface to handle custom implementations.

Why?

Scenario (real usecase of this event):

The whole TYPO3 site has a strict CSP behaviour except MJML-based newsletter pages with a specific backendLayout. Due to the nature of newsletter templates, they include inline styles and images from external CDN services, etc.

So the newsletter is built right within TYPO3. And an external newsletter saas tool fetches this pages. We use this event to relax CSP settings for pages with that backendLayout AND some TYPO3 site settings which needs the request object instead of going the way through $GLOBALS.

Actions

Also available in: Atom PDF