csrf_test.routing.yml in Drupal 10
Same filename and directory in other branches
core/modules/system/tests/modules/csrf_test/csrf_test.routing.yml
1 string reference to YAML keys in csrf_test.routing.yml
- CsrfRequestHeaderTest::testRouteAccess in core/
modules/ system/ tests/ src/ Functional/ CsrfRequestHeaderTest.php - Tests access to routes protected by CSRF request header requirements.
File
core/modules/system/tests/modules/csrf_test/csrf_test.routing.ymlView source
- # Tests CSRF request header token protection.
- csrf_test.protected:
- path: csrf/protected
- defaults:
- _controller: '\Drupal\csrf_test\Controller\TestController::testMethod'
- requirements:
- _csrf_request_header_token: 'TRUE'
- _method: 'POST'
- csrf_test.route_with_csrf_token:
- path: csrf/protected/route
- defaults:
- _controller: '\Drupal\csrf_test\Controller\TestController::testMethod'
- requirements:
- _permission: 'administer site configuration'
- _csrf_token: 'TRUE'