mirror of https://github.com/k3s-io/k3s
Add WrappedRoundTripper() to tokenSourceTransport
parent
3a0f127bf5
commit
6294e7032f
|
@ -64,6 +64,10 @@ type tokenSourceTransport struct {
|
|||
ort http.RoundTripper
|
||||
}
|
||||
|
||||
func (tst *tokenSourceTransport) WrappedRoundTripper() http.RoundTripper {
|
||||
return tst.base
|
||||
}
|
||||
|
||||
func (tst *tokenSourceTransport) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
// This is to allow --token to override other bearer token providers.
|
||||
if req.Header.Get("Authorization") != "" {
|
||||
|
|
Loading…
Reference in New Issue