Skip to content

Commit

Permalink
Merge branch 'main' into health-check
Browse files Browse the repository at this point in the history
  • Loading branch information
juancwu authored Dec 16, 2024
2 parents a49ea82 + 2832c79 commit 959bd30
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions backend/internal/middleware/request_id.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package middleware

import (
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)

// RequestID returns a middleware that adds a request ID to the request context
func RequestID() echo.MiddlewareFunc {
return middleware.RequestID()
}
6 changes: 5 additions & 1 deletion backend/internal/server/middleware.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package server

import (
"KonferCA/SPUR/internal/middleware"
)

/*
Setup all the global middlewares used in the server.
*/
func (s *Server) setupMiddlewares() {

s.Echo.Use(middleware.RequestID())
}

0 comments on commit 959bd30

Please sign in to comment.