MCPcopy Create free account
hub / github.com/imroc/req / getDomain

Function getDomain

redirect.go:102–110  ·  view source on GitHub ↗
(host string)

Source from the content-addressed store, hash-verified

100}
101
102func getDomain(host string) string {
103 host = getHostname(host)
104 ss := strings.Split(host, ".")
105 if len(ss) < 3 {
106 return host
107 }
108 ss = ss[1:]
109 return strings.Join(ss, ".")
110}
111
112// AlwaysCopyHeaderRedirectPolicy ensures that the given sensitive headers will
113// always be copied on redirect.

Callers 3

SameDomainRedirectPolicyFunction · 0.85

Calls 1

getHostnameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…