src/Rules/Http/Header/Cache/MaxAgeRule.php 1 location
|
@@ 24-26 (lines=3) @@
|
| 21 |
|
public function validate(ResponseInterface $response) |
| 22 |
|
{ |
| 23 |
|
if ($response->getStatusCode() <= $this->maxStatusCode) { |
| 24 |
|
if ($response->hasHeader('Cache-Control') && false !== strpos($response->getHeader('Cache-Control')[0], 'max-age=0')) { |
| 25 |
|
throw new ValidationFailedException('max-age=0 was found'); |
| 26 |
|
} |
| 27 |
|
} |
| 28 |
|
} |
| 29 |
|
} |
src/Rules/Http/Header/Cache/PragmaNoCacheRule.php 1 location
|
@@ 28-30 (lines=3) @@
|
| 25 |
|
throw new ValidationFailedException('pragma:no-cache was found'); |
| 26 |
|
} |
| 27 |
|
|
| 28 |
|
if ($response->hasHeader('Cache-Control') && false !== strpos($response->getHeader('Cache-Control')[0], 'no-cache')) { |
| 29 |
|
throw new ValidationFailedException('cache-control:no-cache was found'); |
| 30 |
|
} |
| 31 |
|
} |
| 32 |
|
} |
| 33 |
|
} |