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 ¶
func (SafeMethod) Matches ¶
func (t SafeMethod) Matches(w http.ResponseWriter, r *http.Request) bool
Click to show internal directories.
Click to hide internal directories.