MCPcopy Create free account
hub / github.com/kataras/iris / GetHost

Function GetHost

context/context.go:976–982  ·  view source on GitHub ↗

PathPrefixMap accepts a map of string and a handler. The key of "m" is the key, which is the prefix, regular expressions are not valid. The value of "m" is the handler that will be executed if HasPrefix(context.Path). func (ctx *Context) PathPrefixMap(m map[string]context.Handler) bool { path := ct

(r *http.Request)

Source from the content-addressed store, hash-verified

974
975// GetHost returns the host part of the current URI.
976func GetHost(r *http.Request) string {
977 // contains subdomain.
978 if host := r.URL.Host; host != "" {
979 return host
980 }
981 return r.Host
982}
983
984// Host returns the host:port part of the request URI, calls the `Request().Host`.
985// To get the subdomain part as well use the `Request().URL.Host` method instead.

Callers 7

RewriteMethod · 0.92
setLangWithoutContextMethod · 0.92
WrapperMethod · 0.92
WrapperMethod · 0.92
newHostRedirectAppFunction · 0.92
HostMethod · 0.85
GetSubdomainFullFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…