Versions in this module Expand all Collapse all v1 v1.0.0 Mar 21, 2026 Changes in this version + type CSRFHookID string + const HookIDCSRFGenerate + const HookIDCSRFProtect + func (id CSRFHookID) String() string + type CSRFPlugin struct + func New(config CSRFPluginConfig) *CSRFPlugin + func (p *CSRFPlugin) Close() error + func (p *CSRFPlugin) Config() any + func (p *CSRFPlugin) Hooks() []models.Hook + func (p *CSRFPlugin) Init(ctx *models.PluginContext) error + func (p *CSRFPlugin) Metadata() models.PluginMetadata + func (p *CSRFPlugin) Middleware() func(http.Handler) http.Handler + func (p *CSRFPlugin) OnConfigUpdate(config *models.Config) error + type CSRFPluginConfig struct + CookieName string + EnableHeaderProtection bool + Enabled bool + HeaderName string + MaxAge time.Duration + SameSite string + Secure bool + func (config *CSRFPluginConfig) ApplyDefaults()