Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
filterHttp2ServerPushHeader example
$response
= parent::
handle
(
$request
,
$type
,
$catch
)
;
$response
->headers->
remove
(
'cache-control'
)
;
$response
->headers->
addCacheControlDirective
(
'no-cache'
)
;
if
(
str_starts_with
(
$request
->
getPathInfo
(
)
, '/account'
)
)
{
$response
->headers->
addCacheControlDirective
(
'no-store'
)
;
}
$response
=
$this
->
handleCookies
(
$request
,
$response
)
;
$this
->
filterHttp2ServerPushHeader
(
$request
,
$response
)
;
return
$response
;
}
/** * @return string */
public
function
getCacheDir
(
)
{
return
$this
->cacheDir;
}