Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DenyPrivateImageStyleDownload.php

function DenyPrivateImageStyleDownload::check

Overrides ResponsePolicyInterface::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;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal