mirror of
https://github.com/kataras/iris.git
synced 2026-01-10 05:25:58 +00:00
#1399 [BUG]Can't set file server in subdomain with request path is "/"
Former-commit-id: 2914cafeab26ae8a716138bec95ade6953ddd04b
This commit is contained in:
@@ -231,6 +231,11 @@ func splitSubdomainAndPath(fullUnparsedPath string) (subdomain string, path stri
|
||||
return "", "/"
|
||||
}
|
||||
|
||||
splitPath := strings.Split(s, ".")
|
||||
if len(splitPath) == 2 && splitPath[1] == "" {
|
||||
return splitPath[0] + ".", "/"
|
||||
}
|
||||
|
||||
slashIdx := strings.IndexByte(s, '/')
|
||||
if slashIdx > 0 {
|
||||
// has subdomain
|
||||
|
||||
Reference in New Issue
Block a user