function DenyTestAuthRequests::check
Same name in other branches
- 8.9.x core/modules/rest/tests/modules/rest_test/src/PageCache/RequestPolicy/DenyTestAuthRequests.php \Drupal\rest_test\PageCache\RequestPolicy\DenyTestAuthRequests::check()
- 10 core/modules/rest/tests/modules/rest_test/src/PageCache/RequestPolicy/DenyTestAuthRequests.php \Drupal\rest_test\PageCache\RequestPolicy\DenyTestAuthRequests::check()
- 11.x core/modules/rest/tests/modules/rest_test/src/PageCache/RequestPolicy/DenyTestAuthRequests.php \Drupal\rest_test\PageCache\RequestPolicy\DenyTestAuthRequests::check()
Overrides RequestPolicyInterface::check
File
-
core/
modules/ rest/ tests/ modules/ rest_test/ src/ PageCache/ RequestPolicy/ DenyTestAuthRequests.php, line 25
Class
- DenyTestAuthRequests
- Cache policy for pages requested with REST Test Auth.
Namespace
Drupal\rest_test\PageCache\RequestPolicyCode
public function check(Request $request) {
if ($request->headers
->has('REST-test-auth') || $request->headers
->has('REST-test-auth-global')) {
return self::DENY;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.