File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package main
2
2
3
3
import (
4
4
"context"
5
+ "encoding/base64"
5
6
"errors"
6
7
"net/http"
7
8
"slices"
@@ -26,10 +27,11 @@ func AuthHandler(subjects []string, verifier Verifier) http.Handler {
26
27
return http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
27
28
log .Trace ().Func (func (e * zerolog.Event ) {
28
29
headers := r .Header .Clone ()
29
- // headers.Del("Authorization")
30
- // if r.Header.Get("Authorization") != "" {
31
- // headers.Set("Authorization", "!REMOVED!")
32
- // }
30
+ headers .Del ("Authorization" )
31
+ if authHeader := r .Header .Get ("Authorization" ); authHeader != "" {
32
+ authHeader = base64 .StdEncoding .EncodeToString ([]byte (authHeader ))
33
+ headers .Set ("Authorization" , authHeader )
34
+ }
33
35
e .Interface ("headers" , headers )
34
36
}).Msg ("Request details" )
35
37
t := time .Now ()
You can’t perform that action at this time.
0 commit comments