Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/receiver/receiver_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func (s *HTTP) Serve(h Handler, ln net.Listener) error {
}
_, _ = w.Write([]byte("OK"))
})
handler.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
http.Error(w, "To send events via HTTP, use /api/statshousev1 endpoint and send event is http body. All event formats (JSON, TL, Protobuf, etc.) supported via UDP also work via HTTP.", http.StatusNotFound)
})
server := http.Server{Handler: handler}
log.Printf("Serve HTTP on %s", ln.Addr())
err := server.Serve(ln)
Expand Down