Skip to content

Commit

Permalink
clear headers
Browse files Browse the repository at this point in the history
  • Loading branch information
cjimti committed Feb 18, 2020
1 parent 0a39d13 commit a3412f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/jwtpxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func (p *Proxy) handle(w http.ResponseWriter, r *http.Request) {

if claims, ok := token.Claims.(jwt.MapClaims); ok && token.Valid {
// @TODO map claims to headers from config
r.Header = http.Header{}
r.Header.Add("From", claims["preferred_username"].(string))
} else {
w.WriteHeader(http.StatusUnauthorized)
Expand Down

0 comments on commit a3412f2

Please sign in to comment.