1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-24 05:17:03 +00:00
Gerasimos (Makis) Maropoulos
2020-08-14 13:04:48 +03:00
parent 558d6d41bb
commit dc35391ceb
3 changed files with 5 additions and 5 deletions

View File

@@ -785,12 +785,11 @@ func (ctx *Context) Host() string {
// GetHost returns the host part of the current URI.
func GetHost(r *http.Request) string {
if host := r.Host; host != "" {
// contains subdomain.
if host := r.URL.Host; host != "" {
return host
}
// contains subdomain.
return r.URL.Host
return r.Host
}
// Subdomain returns the subdomain of this request, if any.