mirror of
https://github.com/niusmallnan/steve.git
synced 2025-07-18 16:41:13 +00:00
Strip impersonation headers prior to proxy call
This commit is contained in:
parent
bed06c1320
commit
bb76e4db56
@ -79,6 +79,12 @@ func impersonate(rw http.ResponseWriter, req *http.Request, prefix string, cfg *
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
req = req.Clone(req.Context())
|
||||||
|
for k := range req.Header {
|
||||||
|
if strings.HasPrefix(k, "Impersonate-") {
|
||||||
|
delete(req.Header, k)
|
||||||
|
}
|
||||||
|
}
|
||||||
handler.ServeHTTP(rw, req)
|
handler.ServeHTTP(rw, req)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user