security

package
v0.1.0-alpha.138 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package security contains framework-enforced HTTP boundary protections.

Index

Constants

View Source
const (
	CSRFCookie = "__Host-gobeyond-csrf"
	CSRFHeader = "X-GoBeyond-CSRF"
)

Variables

This section is empty.

Functions

func StripReservedHeaders

func StripReservedHeaders(header http.Header)

func ValidateHost

func ValidateHost(request *http.Request, allowed []string) error

func ValidateSameOrigin

func ValidateSameOrigin(request *http.Request, publicOrigin string) error

Types

type CSRF

type CSRF struct {
	// contains filtered or unexported fields
}

func NewCSRF

func NewCSRF(secret []byte) (*CSRF, error)

func (*CSRF) Cookie

func (c *CSRF) Cookie(token string) *http.Cookie

func (*CSRF) Token

func (c *CSRF) Token() (string, error)

func (*CSRF) Verify

func (c *CSRF) Verify(request *http.Request, publicOrigin string) error

Jump to

Keyboard shortcuts

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