mirror of
https://github.com/kataras/iris.git
synced 2025-12-19 10:57:05 +00:00
General Improvements (UseRouter per Party, fix AutoTLS). Read HISTORY.md
relative to: https://github.com/kataras/iris/issues/1577 and https://github.com/kataras/iris/issues/1578
This commit is contained in:
@@ -235,6 +235,14 @@ func splitSubdomainAndPath(fullUnparsedPath string) (subdomain string, path stri
|
||||
subdomain = s[0:slashIdx]
|
||||
}
|
||||
|
||||
if slashIdx == -1 {
|
||||
// this will only happen when this function
|
||||
// is called to Party's relative path (e.g. control.admin.),
|
||||
// and not a route's one (the route's one always contains a slash).
|
||||
// return all as subdomain and "/" as path.
|
||||
return s, "/"
|
||||
}
|
||||
|
||||
path = s[slashIdx:]
|
||||
if !strings.Contains(path, "{") {
|
||||
path = strings.ReplaceAll(path, "//", "/")
|
||||
|
||||
Reference in New Issue
Block a user