Keep the entrypoint UUID out of webhooker's own logs (closes #531)
check / check (push) Waiting to run

On the receiver route the access log and the per-entrypoint 429 line
name the route pattern whatever the status. The received line names
the entrypoint and webhook IDs, and the unknown-entrypoint line logs
no path. The pattern is middleware.ReceiverRoute, which routes.go
registers the receiver with.

The README says the proxy's access log holds the UUID and must be
protected like the URL, and its access-log, rate-limit, Sentry and
log-size passages now match the code.

Model: opus-5-5
This commit is contained in:
2026-10-15 08:19:10 +00:00
parent 573f7f986a
commit e2b64c0a66
10 changed files with 265 additions and 161 deletions
+4 -3
View File
@@ -6,7 +6,8 @@ import (
sentryhttp "github.com/getsentry/sentry-go/http"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
chimw "github.com/go-chi/chi/middleware"
"sneak.berlin/go/webhooker/internal/middleware"
"sneak.berlin/go/webhooker/static"
)
@@ -60,7 +61,7 @@ func (s *Server) SetupRoutes() {
}
func (s *Server) setupGlobalMiddleware() {
s.router.Use(middleware.RequestID)
s.router.Use(chimw.RequestID)
s.router.Use(s.mw.SecurityHeaders())
s.router.Use(s.mw.Logging())
@@ -345,7 +346,7 @@ func (s *Server) setupWebhookRoutes() {
// unauthenticated endpoint's body; TestReceiver_OversizeBodyRefused
// pins it.
s.router.With(s.mw.ReceiverRateLimit()).HandleFunc(
"/h/{uuid}",
middleware.ReceiverRoute,
s.h.HandleWebhook(),
)
}