Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrefersHTML ¶
PrefersHTML returns true if the request was made by something that looks like a browser, or can receive HTML
func SchemeHost ¶ added in v1.3.0
SchemeHost returns the scheme and host used to make this request. Suitable for use to compute scheme/host in returned 302 redirect Location. Note the returned host is not normalized, and may or may not contain a port. Returned values are based on the following information:
Host: * X-Forwarded-Host/X-Forwarded-Port headers * Host field on the request (parsed from Host header) * Host in the request's URL (parsed from Request-Line)
Scheme: * X-Forwarded-Proto header * Existence of TLS information on the request implies https * Scheme in the request's URL (parsed from Request-Line) * Port (if included in calculated Host value, 443 implies https) * Otherwise, defaults to "http"
Types ¶
This section is empty.