diff --git a/cmd/reports-collector/main.go b/cmd/reports-collector/main.go index 2acd95edbd75c2474adcc0558d8195e2ff64f48e..76631209d89c1bbdd3bc44e4d265c97628ef0712 100644 --- a/cmd/reports-collector/main.go +++ b/cmd/reports-collector/main.go @@ -25,7 +25,7 @@ func main() { // Create the http.Server. mux := http.NewServeMux() - mux.Handle("/ingest", collector) + mux.Handle("/ingest/v1", collector) server := &http.Server{ Addr: *addr, Handler: mux, diff --git a/collector.go b/collector.go index 262788f6b8c786f88c54a40c1bc9b8e1ff5c9860..6ebdc88ab0adb7ca551acec39b008fc0206a5a8f 100644 --- a/collector.go +++ b/collector.go @@ -31,10 +31,6 @@ func NewCollector(sink Sink, handlers ...Handler) *Collector { } func (c *Collector) ServeHTTP(w http.ResponseWriter, req *http.Request) { - if req.URL.Path != "/" { - http.NotFound(w, req) - return - } if req.Method != http.MethodPost { http.Error(w, "Bad method", http.StatusMethodNotAllowed) return