mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-03 14:37:44 +01:00
Feat: enable tls in chart
add tls related code in chart server Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
parent
e6bb3b0977
commit
10753caf90
@ -31,12 +31,12 @@ type ChartClient struct {
|
|||||||
// NewChartClient is constructor of ChartClient
|
// NewChartClient is constructor of ChartClient
|
||||||
// credential can be nil
|
// credential can be nil
|
||||||
func NewChartClient(credential *Credential) *ChartClient { // Create http client with customized timeouts
|
func NewChartClient(credential *Credential) *ChartClient { // Create http client with customized timeouts
|
||||||
|
tr := commonhttp.GetHTTPTransport(commonhttp.InternalTransport)
|
||||||
|
tr.MaxIdleConns = maxIdleConnections
|
||||||
|
tr.IdleConnTimeout = idleConnectionTimeout
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
Timeout: clientTimeout,
|
Timeout: clientTimeout,
|
||||||
Transport: &http.Transport{
|
Transport: tr,
|
||||||
MaxIdleConns: maxIdleConnections,
|
|
||||||
IdleConnTimeout: idleConnectionTimeout,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &ChartClient{
|
return &ChartClient{
|
||||||
|
Loading…
Reference in New Issue
Block a user