From dd477b4dafd42650a3b3189ddad3a264b52535b2 Mon Sep 17 00:00:00 2001 From: Emran Batmanghelich Date: Sun, 8 Jun 2025 20:17:15 +0330 Subject: [PATCH] fix(client): trim trailing slash in endpoint --- pkg/client/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/client/client.go b/pkg/client/client.go index 4c31c6e..c91ab8f 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -5,6 +5,7 @@ import ( "fmt" "net/http" "regexp" + "strings" "time" "resty.dev/v3" @@ -29,6 +30,7 @@ func New(endpoint, publicKey, secretKey string) LangfuseClient { func NewWithHttpClient(httpClient *http.Client, endpoint, publicKey, secretKey string) LangfuseClient { client := resty.NewWithClient(httpClient). SetBasicAuth(publicKey, secretKey) + endpoint = strings.TrimSuffix(endpoint, "/") return &langfuseClient{ restClient: client, endpoint: endpoint,