Skip to content

Commit

Permalink
Use ChainedNonPersistent for non ios.
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-f committed Sep 11, 2024
1 parent 727623a commit 64b7d7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internalsdk/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package auth

import (
"context"
"fmt"
"net/http"
"strings"
"time"
Expand Down Expand Up @@ -53,13 +54,14 @@ func NewClient(baseURL string, userConfig func() common.UserConfig) AuthClient {

var httpClient *http.Client

if strings.HasSuffix(baseURL, common.APIBaseUrl) {
if baseURL == fmt.Sprintf("https://%s", common.APIBaseUrl) {
log.Debug("using proxied.Fronted")
//this is ios version
httpClient = &http.Client{
Transport: proxied.Fronted(30 * time.Second),
}
} else {
log.Debug("using proxied.ChainedNonPersistent")
rt, _ := proxied.ChainedNonPersistent("")
httpClient = pro.NewHTTPClient(rt, 30*time.Second)
}
Expand Down

0 comments on commit 64b7d7c

Please sign in to comment.