fix: passing correct httpClient, do not use DefaultClients (#3319)
most of our deployments use custom certificates, using DefaultClient makes it virtually impossible to make share URL feature work. this PR fixes this behavior in the implementation. Bonus: re-use transports inside console, will add more changes to take custom transport inputs in subsequent PR.
This commit is contained in:
@@ -191,8 +191,7 @@ func getLoginDetailsResponse(params authApi.LoginDetailParams, openIDProviders o
|
||||
for name, provider := range openIDProviders {
|
||||
// initialize new oauth2 client
|
||||
|
||||
oauth2Client, err := provider.GetOauth2Provider(name, nil, r, GetConsoleHTTPClient("", getClientIP(params.HTTPRequest)),
|
||||
GetConsoleHTTPClient(getMinIOServer(), getClientIP(params.HTTPRequest)))
|
||||
oauth2Client, err := provider.GetOauth2Provider(name, nil, r, GetConsoleHTTPClient(getClientIP(params.HTTPRequest)))
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
@@ -281,8 +280,8 @@ func getLoginOauth2AuthResponse(params authApi.LoginOauth2AuthParams, openIDProv
|
||||
}
|
||||
|
||||
// Initialize new identity provider with new oauth2Client per IDPName
|
||||
oauth2Client, err := providerCfg.GetOauth2Provider(IDPName, nil, r, GetConsoleHTTPClient("", getClientIP(params.HTTPRequest)),
|
||||
GetConsoleHTTPClient(getMinIOServer(), getClientIP(params.HTTPRequest)))
|
||||
oauth2Client, err := providerCfg.GetOauth2Provider(IDPName, nil, r,
|
||||
GetConsoleHTTPClient(getClientIP(params.HTTPRequest)))
|
||||
if err != nil {
|
||||
return nil, ErrorWithContext(ctx, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user