Skip to content

Commit fc932eb

Browse files
committed
feat expose RequestIDHeaderKey globally
1 parent 4126488 commit fc932eb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

middleware.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import (
1515
const (
1616
customAttributesCtxKey = "slog-gin.custom-attributes"
1717
requestIDCtx = "slog-gin.request-id"
18-
// Formatted with http.CanonicalHeaderKey
19-
requestIDHeaderKey = "X-Request-Id"
2018
)
2119

2220
var (
@@ -34,6 +32,9 @@ var (
3432
HiddenResponseHeaders = map[string]struct{}{
3533
"set-cookie": {},
3634
}
35+
36+
// Formatted with http.CanonicalHeaderKey
37+
RequestIDHeaderKey = "X-Request-Id"
3738
)
3839

3940
type Config struct {

0 commit comments

Comments
 (0)