You are here

public function DenyPrivateImageStyleDownload::check in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/image/src/PageCache/DenyPrivateImageStyleDownload.php \Drupal\image\PageCache\DenyPrivateImageStyleDownload::check()
  2. 9 core/modules/image/src/PageCache/DenyPrivateImageStyleDownload.php \Drupal\image\PageCache\DenyPrivateImageStyleDownload::check()

File

core/modules/image/src/PageCache/DenyPrivateImageStyleDownload.php, line 38

Class

DenyPrivateImageStyleDownload
Cache policy for image preview page.

Namespace

Drupal\image\PageCache

Code

public function check(Response $response, Request $request) {
  if ($this->routeMatch
    ->getRouteName() === 'image.style_private') {
    return static::DENY;
  }
}