mirror of
https://github.com/kataras/iris.git
synced 2026-01-07 12:07:28 +00:00
Parse server's addr before use it
This commit is contained in:
@@ -220,7 +220,7 @@ func (ctx *Context) HostString() string {
|
||||
func (ctx *Context) VirtualHostname() string {
|
||||
realhost := ctx.HostString()
|
||||
hostname := realhost
|
||||
virtualhost := ctx.framework.Servers.Main().VirtualHostname()
|
||||
virtualhost := ctx.framework.Servers.Main().Hostname()
|
||||
|
||||
if portIdx := strings.IndexByte(hostname, ':'); portIdx > 0 {
|
||||
hostname = hostname[0:portIdx]
|
||||
|
||||
Reference in New Issue
Block a user