function DisallowBasicAuthRequests::check
Same name in other branches
- 9 core/modules/basic_auth/src/PageCache/DisallowBasicAuthRequests.php \Drupal\basic_auth\PageCache\DisallowBasicAuthRequests::check()
- 8.9.x core/modules/basic_auth/src/PageCache/DisallowBasicAuthRequests.php \Drupal\basic_auth\PageCache\DisallowBasicAuthRequests::check()
- 10 core/modules/basic_auth/src/PageCache/DisallowBasicAuthRequests.php \Drupal\basic_auth\PageCache\DisallowBasicAuthRequests::check()
Overrides RequestPolicyInterface::check
File
-
core/
modules/ basic_auth/ src/ PageCache/ DisallowBasicAuthRequests.php, line 20
Class
- DisallowBasicAuthRequests
- Cache policy for pages served from basic auth.
Namespace
Drupal\basic_auth\PageCacheCode
public function check(Request $request) {
$username = $request->headers
->get('PHP_AUTH_USER');
$password = $request->headers
->get('PHP_AUTH_PW');
if (isset($username) && isset($password)) {
return self::DENY;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.