mirror of
https://github.com/kataras/iris.git
synced 2026-01-22 03:15:58 +00:00
This commit is contained in:
@@ -200,7 +200,11 @@ func (ctx *Context) Method() string {
|
||||
|
||||
// Host returns the host part of the current url
|
||||
func (ctx *Context) Host() string {
|
||||
return ctx.Request.URL.Host
|
||||
h := ctx.Request.URL.Host
|
||||
if h == "" {
|
||||
h = ctx.Request.Host
|
||||
}
|
||||
return h
|
||||
}
|
||||
|
||||
// ServerHost returns the server host taken by *http.Request.Host
|
||||
|
||||
Reference in New Issue
Block a user