1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +00:00

Merge branch 'master' into v12

Former-commit-id: 50fae564bda3607f4f4208fdcb72f835c1751a1e
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-11-13 19:19:33 +02:00
3 changed files with 12 additions and 8 deletions

View File

@@ -485,7 +485,8 @@ func (api *APIBuilder) HandleDir(requestPath, directory string, opts ...DirOptio
continue
}
routes = append(routes, api.createRoutes([]string{http.MethodGet}, s.RequestPath, h)...)
requestPath := s.RequestPath[strings.Index(s.RequestPath, api.relativePath)+len(api.relativePath):]
routes = append(routes, api.createRoutes([]string{http.MethodGet}, requestPath, h)...)
getRoute.StaticSites = append(getRoute.StaticSites, s)
}