TYPO3 13 enforces a Content Security Policy in the backend whose img-src only allows the backend's own host, data: URIs and the YouTube/Vimeo CDNs. The frontend references its favicons on the CDN, so yoast's snippet preview showed a broken favicon (CSP report: img-src blocked https://cdn.ep-reisen.de/fileadmin/user_upload/favicon/ep/favicon.ico). Co-Authored-By: Claude Opus 5.5 <[email protected]>
19 lines
733 B
PHP
19 lines
733 B
PHP
<?php
|
|
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Directive;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Mutation;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationCollection;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationMode;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\UriValue;
|
|
use TYPO3\CMS\Core\Type\Map;
|
|
|
|
// The frontend references favicons and images on the CDN, and backend previews (yoast's snippet
|
|
// preview) show them as they are.
|
|
return Map::fromEntries([
|
|
Scope::backend(),
|
|
new MutationCollection(
|
|
new Mutation(MutationMode::Extend, Directive::ImgSrc, new UriValue('https://cdn.ep-reisen.de')),
|
|
),
|
|
]);
|