diff --git a/pkg/camo/proxy.go b/pkg/camo/proxy.go index b967368..b9129b0 100644 --- a/pkg/camo/proxy.go +++ b/pkg/camo/proxy.go @@ -91,7 +91,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { // split path and get components components := strings.Split(req.URL.Path, "/") compLen := len(components) - if compLen < 3 { + if compLen < 3 || compLen > 4 { http.Error(w, "Malformed request path", http.StatusNotFound) return } diff --git a/pkg/router/router.go b/pkg/router/router.go index fd36800..c759767 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -48,7 +48,7 @@ func (dr *DumbRouter) ServeHTTP(w http.ResponseWriter, r *http.Request) { } compLen := strings.Count(r.URL.Path, "/") - if compLen == 3 || compLen == 4 { + if compLen == 2 || compLen == 3 { dr.CamoHandler.ServeHTTP(w, r) return }