NoServerError.php in Drupal 9
File
core/lib/Drupal/Core/PageCache/ResponsePolicy/NoServerError.php
View source
<?php
namespace Drupal\Core\PageCache\ResponsePolicy;
use Drupal\Core\PageCache\ResponsePolicyInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class NoServerError implements ResponsePolicyInterface {
public function check(Response $response, Request $request) {
if ($response
->isServerError()) {
return static::DENY;
}
}
}
Classes
Name |
Description |
NoServerError |
A policy denying caching of a server error (HTTP 5xx) responses. |