1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00
Former-commit-id: 02f6656aceb890217bfc19688d7f45224df274ec
This commit is contained in:
kataras
2017-06-12 18:23:35 +03:00
parent 6ff4500e3c
commit e4df35e351
10 changed files with 38 additions and 15 deletions

View File

@@ -102,6 +102,12 @@ func newSubdomainDivider(sep string) unis.DividerFunc {
subdomainDevider := unis.NewInvertOnFailureDivider(unis.NewDivider(sep))
return func(fullpath string) (string, string) {
subdomain, path := subdomainDevider.Divide(fullpath)
if len(path) > 1 {
if path[0] == '/' && path[1] == '/' {
path = path[1:]
}
}
return subdomain, path //cleanPath(path)
}
}