csrftoken

package
v0.84.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Deprecated: Please upgrade to the newer, more robust, and stateless csrf package available at github.com/vormadev/vorma/kit/csrf.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleware deprecated

func NewMiddleware(opts Opts) func(http.Handler) http.Handler

Deprecated: Please upgrade to the newer, more robust, and stateless csrf package available at github.com/vormadev/vorma/kit/csrf.

Types

type GetExpectedCSRFToken

type GetExpectedCSRFToken = func(r *http.Request) string

type GetSubmittedCSRFToken

type GetSubmittedCSRFToken = func(r *http.Request) string

type Opts deprecated

type Opts struct {
	GetExpectedCSRFToken  GetExpectedCSRFToken
	GetSubmittedCSRFToken GetSubmittedCSRFToken
	GetIsExempt           func(r *http.Request) bool // Exempts from CSRF token check (not host check)
	PermittedHosts        []string                   // If len == 0, all hosts are permitted
}

Deprecated: Please upgrade to the newer, more robust, and stateless csrf package available at github.com/vormadev/vorma/kit/csrf.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL