Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct { // Trust X-Forwarded-Proto headers (this could allow a client // to spoof whether they were using HTTPS). // Optional, defaults to false. TrustXFPHeader bool // Enables 301 redirects to the HTTPS version of the request. // Optional, defaults to false. Enable301Redirects bool // Allows a custom response message when forcing SSL without redirect. // Optional, defaults to "SSL Required." Message string }
Middleware is a go-json-rest middleware. It requires all requests to a go-json-rest server to be over SSL.
func (*Middleware) MiddlewareFunc ¶
func (middleware *Middleware) MiddlewareFunc(handler rest.HandlerFunc) rest.HandlerFunc
MiddlewareFunc makes forceSSL.Middleware implement the rest.Middleware interface.
Click to show internal directories.
Click to hide internal directories.