matchers

package
v0.0.0-...-f34d141 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadReferer = errors.New("A secure request's Referer comes from a different Origin from the request's URL.")
View Source
var ErrNoReferer = errors.New("A secure request contained no Referer or its value was malformed.")

Functions

This section is empty.

Types

type InvalidOrigin

type InvalidOrigin struct {
	utils.FailureHandler
}

func (InvalidOrigin) Matches

func (t InvalidOrigin) Matches(w http.ResponseWriter, r *http.Request) bool

type RequestMatcher

type RequestMatcher interface {
	Matches(http.ResponseWriter, *http.Request) bool
}

func DefaultSafeMethods

func DefaultSafeMethods(failure utils.FailureHandler, next http.Handler) RequestMatcher

func NewInvalidOrigin

func NewInvalidOrigin(failure utils.FailureHandler, next http.Handler) RequestMatcher

type RequestMatcherFactory

type RequestMatcherFactory func(utils.FailureHandler, http.Handler) RequestMatcher

type SafeMethod

type SafeMethod struct {
	Methods []string
	http.Handler
}

func (SafeMethod) Matches

func (t SafeMethod) Matches(w http.ResponseWriter, r *http.Request) bool

Jump to

Keyboard shortcuts

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