CSRF Configuration
The csrf plugin protects routes and services from cross-site request forgery by validating a signed token in matching request headers and cookies. Configuration covers plugin parameters.
Parameters
See plugin common configurations for configuration options available to all plugins.
key
Secret used to sign CSRF tokens. Use a high-entropy value and keep it private.
The field is marked for encrypted storage when gateway data encryption is enabled. Protect the plaintext value in declarative files and secret-delivery workflows.
expires
Token validity period in seconds. Setting
0skips server-side age validation but sets the cookie expiration to its issuance time, so cookie clients may discard it immediately.name
Name used for both the CSRF token cookie and the request header that carries the submitted token.