Issue Task Closed

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

Josef Glatz 06/18/24, 08:23 updated 07/09/24, 15:37

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.

Reviews 4