mirror of
https://github.com/rancher/norman.git
synced 2025-09-25 14:46:57 +00:00
Adding impersonate-extra headers
This commit is contained in:
@@ -134,6 +134,14 @@ func (s *Store) doAuthed(apiContext *types.APIContext, request *rest.Request) re
|
||||
for _, header := range authHeaders {
|
||||
request.SetHeader(header, apiContext.Request.Header[http.CanonicalHeaderKey(header)]...)
|
||||
}
|
||||
|
||||
//set extra info headers
|
||||
for header := range apiContext.Request.Header {
|
||||
if strings.HasPrefix(header, "Impersonate-Extra-") {
|
||||
request.SetHeader(header, apiContext.Request.Header[http.CanonicalHeaderKey(header)]...)
|
||||
}
|
||||
}
|
||||
|
||||
return request.Do(apiContext.Request.Context())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user