security

package
v0.1.0-alpha.58 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 8 Imported by: 0

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