Skip to content

Commit b768373

Browse files
authored
Merge pull request #3 from interline-io/request-id
Enable access to request ID in order to add unique_id to gatekeeper m…
2 parents 851ec71 + 3bffd16 commit b768373

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lmw.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ func RequestIDMiddleware(next http.Handler) http.Handler {
1616
return middleware.RequestID(next)
1717
}
1818

19+
// Re-export GetReqID for use outside the internal package
20+
func GetReqID(ctx context.Context) string {
21+
return middleware.GetReqID(ctx)
22+
}
23+
1924
// Glue between chi RequestID and Zerolog
2025
func RequestIDLoggingMiddleware(next http.Handler) http.Handler {
2126
fn := func(w http.ResponseWriter, r *http.Request) {

0 commit comments

Comments
 (0)