fix: serve css/js via cdn
This commit is contained in:
@@ -85,6 +85,11 @@ $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['rootline']
|
|||||||
'groups' => ['pages'],
|
'groups' => ['pages'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Assets are served through the bunny.net CDN, which gzip/brotli-compresses at the edge.
|
||||||
|
// Pre-gzipped .gzip twins are served with Content-Encoding: gzip and cannot be processed
|
||||||
|
// by the CDN, so stop generating them. mod_deflate still compresses direct origin hits.
|
||||||
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 0;
|
||||||
|
|
||||||
// suppress php deprecation warnings flooding typo3 logs
|
// suppress php deprecation warnings flooding typo3 logs
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] =
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] =
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] & ~E_DEPRECATED & ~E_USER_DEPRECATED;
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] & ~E_DEPRECATED & ~E_USER_DEPRECATED;
|
||||||
|
|||||||
+8
-2
@@ -1,10 +1,16 @@
|
|||||||
config.tx_replacer {
|
config.tx_replacer {
|
||||||
enable_regex = 1
|
enable_regex = 1
|
||||||
|
|
||||||
|
# The quote character is captured rather than matched literally, because the
|
||||||
|
# @font-face block in Page/Main.typoscript writes its url() values with single
|
||||||
|
# quotes - anchoring on `"` alone would skip every font.
|
||||||
|
# typo3conf is scoped to ep_theme/Resources/Public on purpose: it keeps other
|
||||||
|
# extensions, Configuration/ and Resources/Private/ out of the CDN.
|
||||||
search {
|
search {
|
||||||
10 = /"\/?(fileadmin|typo3temp|uploads)/
|
10 = /(["'])\/?(fileadmin|typo3temp|uploads|typo3conf\/ext\/ep_theme\/Resources\/Public)/
|
||||||
}
|
}
|
||||||
|
|
||||||
replace {
|
replace {
|
||||||
10 = "https://cdn.ep-reisen.de/$1
|
10 = $1https://cdn.ep-reisen.de/$2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -5,5 +5,6 @@ plugin.tx_typo3encore {
|
|||||||
builds {
|
builds {
|
||||||
EpThemeConfig = EXT:ep_theme/Resources/Public
|
EpThemeConfig = EXT:ep_theme/Resources/Public
|
||||||
}
|
}
|
||||||
|
preload.enable = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user