mirror of https://github.com/k3s-io/k3s
Merge pull request #45529 from wanghaoran1988/fix_issue_44476
Automatic merge from submit-queue oidc auth plugin not to override the Auth header if it's already exits **What this PR does / why we need it**: oidc auth client plugin should not override the `Authorization` header if it's already exits. **Which issue this PR fixes** : fix oidc auth plugin override the` Authorization` header **Special notes for your reviewer**: **Release note**:pull/6/head
commit
52e8d6b95c
|
@ -216,6 +216,9 @@ type roundTripper struct {
|
|||
}
|
||||
|
||||
func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
if len(req.Header.Get("Authorization")) != 0 {
|
||||
return r.wrapped.RoundTrip(req)
|
||||
}
|
||||
token, err := r.provider.idToken()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue