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:
@@ -19,6 +19,7 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -42,8 +43,8 @@ func StartServer(ctx *cli.Context) error {
|
||||
|
||||
xctx := context.Background()
|
||||
|
||||
transport := api.PrepareSTSClientTransport(false, api.LocalAddress)
|
||||
if err := logger.InitializeLogger(xctx, transport.Transport); err != nil {
|
||||
transport := api.PrepareSTSClientTransport(api.LocalAddress).Transport.(*http.Transport)
|
||||
if err := logger.InitializeLogger(xctx, transport); err != nil {
|
||||
fmt.Println("error InitializeLogger", err)
|
||||
logger.CriticalIf(xctx, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user