Send the request's ID back as X-Request-Id
check / check (push) Waiting to run

A middleware right after chi's RequestID sets the X-Request-Id response
header from the ID RequestID stored in the request context, so every
response carries it and a client can quote it when reporting a problem.
README "Routes" says where the ID comes from.

Model: opus-5-5
This commit is contained in:
2026-10-04 08:31:17 +00:00
parent 3bcd032d37
commit afe4b3bb70
3 changed files with 21 additions and 0 deletions
+1
View File
@@ -29,6 +29,7 @@ func (s *Server) SetupRoutes() {
s.router.Use(middleware.Recoverer)
s.router.Use(middleware.RequestID)
s.router.Use(s.mw.RequestIDResponseHeader())
s.router.Use(s.mw.ClientIP())
s.router.Use(s.mw.SecurityHeaders())
s.router.Use(s.mw.Logging())