Documentation
¶
Index ¶
- func IsLocalRequest(r *http.Request) bool
- func LocalRedirectTarget(rawTarget string, fallback string) string
- func RedirectExternal(w http.ResponseWriter, r *http.Request, target *url.URL, statusCode int)
- func RedirectHTTPS(w http.ResponseWriter, r *http.Request, statusCode int)
- func RedirectLocal(w http.ResponseWriter, r *http.Request, rawTarget string, statusCode int)
- func SetSensitiveCookie(w http.ResponseWriter, r *http.Request, cookie *http.Cookie)
- func UsesHTTPS(r *http.Request) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLocalRequest ¶
IsLocalRequest identifies the only hosts allowed to use sensitive cookies over HTTP.
func LocalRedirectTarget ¶
LocalRedirectTarget reduces every application redirect to a path on the current origin.
func RedirectExternal ¶
RedirectExternal requires callers to pass an explicit absolute HTTP URL.
func RedirectHTTPS ¶
func RedirectHTTPS(w http.ResponseWriter, r *http.Request, statusCode int)
RedirectHTTPS upgrades a public request without accepting a host from any other source.
func RedirectLocal ¶
RedirectLocal is the only application boundary for redirects within the current site.
func SetSensitiveCookie ¶
SetSensitiveCookie applies one policy to every authentication and challenge cookie.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.