middleware

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CorsAny string = "*"
)

Variables

This section is empty.

Functions

func Admin added in v0.3.3

func Admin(manager *session.Manager, url string) phx.Middleware

func Authorize added in v0.3.3

func Authorize(manager *session.Manager, url string) phx.Middleware

func AuthorizeRoles added in v0.3.3

func AuthorizeRoles(manager *session.Manager, url string, roles []core.Role) phx.Middleware

func Cors added in v0.3.4

func Cors(opt CorsOptions) phx.Middleware

func CorsDefault added in v0.3.4

func CorsDefault() phx.Middleware

func Csrf

func Csrf(cs *csrf.Csrf) phx.Middleware

func Logger added in v0.3.0

func Logger(next phx.Handler) phx.Handler

Types

type CorsOptions added in v0.3.4

type CorsOptions struct {
	AllowOrigin  string
	AllowMethods []string
	AllowHeaders []string
	MaxAge       int
}

Jump to

Keyboard shortcuts

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