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