fix: fix route path that not ends with /

This commit is contained in:
Jonas Kaninda
2024-10-28 03:26:32 +01:00
parent d9cc629a4c
commit 5e4f5f4054
3 changed files with 15 additions and 18 deletions

View File

@@ -123,7 +123,7 @@ func (gatewayServer GatewayServer) Initialize() *mux.Router {
router := r.PathPrefix(route.Path).Subrouter()
router.Use(CORSHandler(route.Cors))
router.PathPrefix("/").Handler(proxyRoute.ProxyHandler())
router.PathPrefix("").Handler(proxyRoute.ProxyHandler())
} else {
logger.Error("Error, path is empty in route %s", route.Name)
logger.Info("Route path ignored: %s", route.Path)