diff --git a/app/router/api_router.go b/app/router/api_router.go index 2aa86450a..c08ea5231 100644 --- a/app/router/api_router.go +++ b/app/router/api_router.go @@ -50,7 +50,7 @@ func (r *APIRouter) Handle(w http.ResponseWriter, req *http.Request) { func (r *APIRouter) IsEligibleTraffic(req *http.Request) bool { // All Rest API calls start with "/api/", and thus can be uniquely identified. p := req.URL.Path - return strings.HasPrefix(p, APIMount) + return strings.HasPrefix(p, APIMount+"/") } func (r *APIRouter) Name() string { diff --git a/app/router/git_router.go b/app/router/git_router.go index 745357f01..d7ff814fc 100644 --- a/app/router/git_router.go +++ b/app/router/git_router.go @@ -53,7 +53,7 @@ func (r *GitRouter) IsEligibleTraffic(req *http.Request) bool { // git traffic is always reachable via the git mounting path. p := req.URL.Path - if strings.HasPrefix(p, GitMount) { + if strings.HasPrefix(p, GitMount+"/") { return true }