mirror of
https://github.com/kemko/reproxy.git
synced 2026-01-01 15:55:49 +03:00
fix static match / without webroot defined
This commit is contained in:
@@ -362,8 +362,9 @@ func (s *Service) extendMapper(m URLMapper) URLMapper {
|
||||
|
||||
// static match without assets defined defaulted to src:dst/
|
||||
if m.MatchType == MTStatic && m.AssetsWebRoot == "" && m.AssetsLocation == "" {
|
||||
if src != "/" {
|
||||
m.AssetsWebRoot = strings.TrimSuffix(src, "/")
|
||||
m.AssetsWebRoot = src
|
||||
if m.AssetsWebRoot != "/" {
|
||||
m.AssetsWebRoot = strings.TrimSuffix(m.AssetsWebRoot, "/")
|
||||
}
|
||||
m.AssetsLocation = strings.TrimSuffix(m.Dst, "/") + "/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user