mirror of
https://github.com/kataras/iris.git
synced 2025-12-21 20:07:04 +00:00
Rocket chat is on, Add Port() to the HTTPServer, disable subdomain persistence on subdomains when 127.0.0.1/0.0.0.0
I already made a test framework integration but I will commit this when I finish with the basic tests, we are going to final v3
This commit is contained in:
@@ -101,10 +101,11 @@ func (m *Manager) Start(ctx context.IContext) store.IStore {
|
||||
if portIdx := strings.IndexByte(requestDomain, ':'); portIdx > 0 {
|
||||
requestDomain = requestDomain[0:portIdx]
|
||||
}
|
||||
|
||||
if requestDomain == "0.0.0.0" || requestDomain == "127.0.0.1" {
|
||||
// for these type of hosts, we can't allow subdomains persistance,
|
||||
// the web browser doesn't understand the mysubdomain.0.0.0.0 and mysubdomain.127.0.0.1 as scorrectly ubdomains because of the many dots
|
||||
cookie.SetDomain(requestDomain)
|
||||
// so don't set a domain here
|
||||
|
||||
} else if strings.Count(requestDomain, ".") > 0 { // there is a problem with .localhost setted as the domain, so we check that first
|
||||
|
||||
|
||||
Reference in New Issue
Block a user