mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
oidc auth plugin not to override the Auth header if it's already exits
This commit is contained in:
parent
15f0468986
commit
f54a08093d
@ -216,6 +216,9 @@ type roundTripper struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
|
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()
|
token, err := r.provider.idToken()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user