Allow custom headers on CLI

This commit is contained in:
carlosmonastyrski
2025-03-27 14:33:05 -03:00
parent d55ddcd577
commit 5b11232325
14 changed files with 186 additions and 50 deletions
+6 -1
View File
@@ -13,6 +13,7 @@ import (
"github.com/Infisical/infisical-merge/packages/api"
"github.com/Infisical/infisical-merge/packages/systemd"
"github.com/Infisical/infisical-merge/packages/util"
"github.com/go-resty/resty/v2"
"github.com/pion/dtls/v3"
"github.com/pion/logging"
@@ -40,7 +41,11 @@ type Gateway struct {
}
func NewGateway(identityToken string) (Gateway, error) {
httpClient := resty.New()
httpClient, err := util.GetRestyClientWithCustomHeaders()
if err != nil {
return Gateway{}, fmt.Errorf("unable to get client with custom headers [err=%v]", err)
}
httpClient.SetAuthToken(identityToken)
return Gateway{