Skip to content

Commit

Permalink
Update SetCacheHeaders.php
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored Apr 3, 2024
1 parent 7b90ff9 commit 0347a7c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Illuminate/Http/Middleware/SetCacheHeaders.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ public function handle($request, Closure $next, $options = [])
$options = $this->parseOptions($options);
}

if (isset($options['if_successful']) && ! $response->isSuccessful()) {
if (! $response->isSuccessful()) {
return $response;
}
unset($options['if_successful']);

if (isset($options['etag']) && $options['etag'] === true) {
$options['etag'] = $response->getEtag() ?? md5($response->getContent());
Expand Down

0 comments on commit 0347a7c

Please sign in to comment.