Skip to content

Commit

Permalink
Remove and re-add From header
Browse files Browse the repository at this point in the history
  • Loading branch information
cjimti committed Feb 19, 2020
1 parent 7e9b3d4 commit 1bff219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/jwtpxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,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
// @TODO config headers to preserve
r.Header = http.Header{}
r.Header.Del("From")
r.Header.Add("From", claims["preferred_username"].(string))
} else {
w.WriteHeader(http.StatusUnauthorized)
Expand Down

0 comments on commit 1bff219

Please sign in to comment.