From 247cf1301696c577e953110f2356e740a3b25790 Mon Sep 17 00:00:00 2001 From: Umputun Date: Tue, 8 Jun 2021 03:48:37 -0500 Subject: [PATCH] fix static match / without webroot defined --- app/discovery/discovery.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/discovery/discovery.go b/app/discovery/discovery.go index 8994319..172cc08 100644 --- a/app/discovery/discovery.go +++ b/app/discovery/discovery.go @@ -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, "/") + "/" }