JSON API: Cache-Control no-cache + ETag/304 revalidation
New JsonCacheHeaders middleware (outer, frontend stack): GET/HEAD 200 responses under /_json get a single Cache-Control: no-cache, Expires: 0 and a content md5 ETag; If-None-Match answers as empty 304. Logged-in visitors (fe_typo_user) keep TYPO3 headers. Expires: 0 is deliberate so mod_expires leaves the response alone. .htaccess: the global Header unset ETag now skips /_json (KEEP_ETAG env, carried across the mod_rewrite internal redirect as REDIRECT_KEEP_ETAG). Fulfils tickets 0011-FE point 3 and 0055-BE question 6; asset immutable headers were already live. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dcd713f222
commit
351349ec1f
3 files changed
+79
-2
No files matched your search
@@ -56,6 +56,17 @@ return [
|
||||
'typo3/cms-core/normalized-params-attribute',
|
||||
],
|
||||
],
|
||||
// Outer response filter: Cache-Control: no-cache + ETag/304 for
|
||||
// /_json (tickets 0011-FE / 0055-BE).
|
||||
'vitec/json-cache-headers' => [
|
||||
'target' => \Evomedien\Vitec\Middleware\JsonCacheHeaders::class,
|
||||
'after' => [
|
||||
'typo3/cms-core/normalized-params-attribute',
|
||||
],
|
||||
'before' => [
|
||||
'vitec/json-prefix-rewrite',
|
||||
],
|
||||
],
|
||||
],
|
||||
'backend' => [
|
||||
'vitec/sync-ssr-flag' => [
|
||||
|
||||
Reference in new issue
Block a user