mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
fix url host is empty when !edge on sessions subdomains persistence
Former-commit-id: 335a4f252e387d939b2cf9311e3acc8b35a41ce9
This commit is contained in:
parent
e3563cff59
commit
9ff124d39f
|
@ -46,7 +46,7 @@ func (s *Sessions) updateCookie(ctx context.Context, sid string, expires time.Du
|
||||||
cookie.Path = "/"
|
cookie.Path = "/"
|
||||||
if !s.config.DisableSubdomainPersistence {
|
if !s.config.DisableSubdomainPersistence {
|
||||||
|
|
||||||
requestDomain := ctx.Request().URL.Host
|
requestDomain := ctx.Host()
|
||||||
if portIdx := strings.IndexByte(requestDomain, ':'); portIdx > 0 {
|
if portIdx := strings.IndexByte(requestDomain, ':'); portIdx > 0 {
|
||||||
requestDomain = requestDomain[0:portIdx]
|
requestDomain = requestDomain[0:portIdx]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user