小编dev*_*evi的帖子

如何在flagsmith中跳过TLS验证?

我想跳过 flagsmith 的 TLS 验证。

注意:我使用的是flagsmithv3 go sdk。

这是我当前的代码:

func InitializeFlagsmith() *flagsmith.Client {
    apiKey := "ser..."
    customerAPIEndpoint := "https://example.com/api/v1/"

    // Create Flagsmith client options
    options := []flagsmith.Option{
        flagsmith.WithBaseURL(customerAPIEndpoint),
        flagsmith.WithLocalEvaluation(context.Background()),
        flagsmith.WithEnvironmentRefreshInterval(60 * time.Second),
    }

    // Initialize Flagsmith client with custom options
    flagsmithClient := flagsmith.NewClient(apiKey, options...)

    return flagsmithClient
}
Run Code Online (Sandbox Code Playgroud)

我检查了flagsmith代码,所以我发现了这一点,如何更改 &Client 中的客户端?

// NewClient creates instance of Client with given configuration.
func NewClient(apiKey string, options ...Option) *Client {
    c := &Client{
        apiKey: apiKey,
        config: defaultConfig(),
        client: flaghttp.NewClient(),
    }

    c.client.SetHeaders(map[string]string{
        "Accept": …
Run Code Online (Sandbox Code Playgroud)

go tls1.2 feature-flags flagsmith

5
推荐指数
1
解决办法
83
查看次数

标签 统计

feature-flags ×1

flagsmith ×1

go ×1

tls1.2 ×1