mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 09:43:13 +08:00
Allow redirect cache visibility to be configured
This commit is contained in:
@@ -20,7 +20,11 @@ readonly class RedirectResponseHelper implements RedirectResponseHelperInterface
|
||||
{
|
||||
$statusCode = $this->options->redirectStatusCode;
|
||||
$headers = ! $statusCode->allowsCache() ? [] : [
|
||||
'Cache-Control' => sprintf('private,max-age=%s', $this->options->redirectCacheLifetime),
|
||||
'Cache-Control' => sprintf(
|
||||
'%s,max-age=%s',
|
||||
$this->options->redirectCacheVisibility,
|
||||
$this->options->redirectCacheLifetime,
|
||||
),
|
||||
];
|
||||
|
||||
return new RedirectResponse($location, $statusCode->value, $headers);
|
||||
|
||||
Reference in New Issue
Block a user