Skip to content

Commit

Permalink
Merge pull request #56 from dvershinin/main
Browse files Browse the repository at this point in the history
s-maxage is the correct header
  • Loading branch information
freekmurze authored Jan 28, 2022
2 parents ec04cb8 + 0915626 commit d8aab5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Middleware/CacheWithVarnish.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function handle($request, Closure $next, int $cacheTimeInMinutes = null)

return $response->withHeaders([
config('varnish.cacheable_header_name') => '1',
'Cache-Control' => 'public, max-age='. 60 * ($cacheTimeInMinutes ?? config('varnish.cache_time_in_minutes')),
'Cache-Control' => 'public, s-maxage='. 60 * ($cacheTimeInMinutes ?? config('varnish.cache_time_in_minutes')),
]);
}
}

0 comments on commit d8aab5e

Please sign in to comment.