You are here

csrf_test.routing.yml in Drupal 10

core/modules/system/tests/modules/csrf_test/csrf_test.routing.yml

File

core/modules/system/tests/modules/csrf_test/csrf_test.routing.yml
View source
  1. # Tests CSRF request header token protection.
  2. csrf_test.protected:
  3. path: csrf/protected
  4. defaults:
  5. _controller: '\Drupal\csrf_test\Controller\TestController::testMethod'
  6. requirements:
  7. _csrf_request_header_token: 'TRUE'
  8. _method: 'POST'
  9. csrf_test.route_with_csrf_token:
  10. path: csrf/protected/route
  11. defaults:
  12. _controller: '\Drupal\csrf_test\Controller\TestController::testMethod'
  13. requirements:
  14. _permission: 'administer site configuration'
  15. _csrf_token: 'TRUE'