mirror of
https://github.com/umputun/reproxy.git
synced 2024-09-11 08:55:25 +03:00
fix static match / without webroot defined
This commit is contained in:
parent
3fb723c8b9
commit
247cf13016
@ -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, "/") + "/"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user