Skip to content

Commit 50d7e7b

Browse files
committed
Remove redundant header clone in auth middleware
1 parent 166500a commit 50d7e7b

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

lib/middleware/oapi_auth.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ func JwtAuth(jwtSecret string) func(http.Handler) http.Handler {
475475

476476
func requestWithoutAuthorization(r *http.Request, ctx context.Context) *http.Request {
477477
req := r.Clone(ctx)
478-
req.Header = r.Header.Clone()
479478
req.Header.Del("Authorization")
480479
return req
481480
}

0 commit comments

Comments
 (0)