mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(server): add request ID middleware
Add request ID middleware to trace requests through the system. The middleware checks for existing X-Request-ID headers, generates a new UUID if not present, and sets the ID in both request/response headers and Gin context.
This commit is contained in:
@@ -121,6 +121,7 @@ func main() {
|
||||
|
||||
// 5. Setup Gin Router
|
||||
r := gin.Default()
|
||||
r.Use(middleware.RequestID())
|
||||
|
||||
// CORS Middleware
|
||||
r.Use(func(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user