Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Host ¶
Host gets the first X-Forwarded-Host header from the request
Please use r.Host directly because this value can easily be spoofed and not all reverseProxies set these field
Types ¶
type Middleware ¶
func Forwarded ¶
func Forwarded(trustedProxies int) Middleware
Forwarded looks at the headers of the requests and populates the X-Forwarded-Host and X-Forwarded-Proto values in the context and puts the first trusted X-Forwarded-For value as r.RemoteAddr
Click to show internal directories.
Click to hide internal directories.