Skip to content

Commit

Permalink
feat expose RequestIDHeaderKey globally
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Mar 18, 2024
1 parent 4126488 commit fc932eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import (
const (
customAttributesCtxKey = "slog-gin.custom-attributes"
requestIDCtx = "slog-gin.request-id"
// Formatted with http.CanonicalHeaderKey
requestIDHeaderKey = "X-Request-Id"
)

var (
Expand All @@ -34,6 +32,9 @@ var (
HiddenResponseHeaders = map[string]struct{}{
"set-cookie": {},
}

// Formatted with http.CanonicalHeaderKey
RequestIDHeaderKey = "X-Request-Id"
)

type Config struct {
Expand Down

0 comments on commit fc932eb

Please sign in to comment.