Documentation
¶
Overview ¶
Package clientip carries the best-effort client address of a request through the context, so ogen handlers (which never see the *http.Request) can record it as proof, e.g. on a double-opt-in confirmation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext returns the address stored by Middleware, or "" outside a request.
func FromRequest ¶
FromRequest returns the address our trusted proxy saw, falling back to the connection's remote host when the request did not come through one.
func Middleware ¶
Middleware stores FromRequest and the User-Agent in the request context for FromContext and UserAgentFromContext.
func UserAgentFromContext ¶
UserAgentFromContext returns the request's User-Agent stored by Middleware, or "" outside a request.
Types ¶
This section is empty.