~elektito/hodhod

3c5a1b5fe9ea19c33d00ab47f77c2af291304e19 — Mostafa Razavi 1 year, 2 months ago f511504
Fix bug in route matching
1 files changed, 1 insertions(+), 1 deletions(-)

M pkg/hodhod/config.go
M pkg/hodhod/config.go => pkg/hodhod/config.go +1 -1
@@ 139,7 139,7 @@ func (cfg *Config) GetBackendByUrl(u url.URL) (backend *Backend, unmatched strin
			return
		case route.Prefix != "" && strings.HasPrefix(ustr, route.Prefix):
			if len(u.Path) > len(route.Prefix) {
				unmatched = unmatched[len(route.Prefix):]
				unmatched = u.Path[len(route.Prefix):]
				if unmatched[0] == '/' {
					unmatched = unmatched[1:]
				}