From f3b60978498e0e95fd0338418bde7b2291bff4b4 Mon Sep 17 00:00:00 2001 From: Pranav Singh Date: Sat, 30 Nov 2024 15:34:43 +0530 Subject: [PATCH] fix request headers with missing cookies Signed-off-by: Pranav Singh --- cmd/kanvas-snapshot/cmd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kanvas-snapshot/cmd.go b/cmd/kanvas-snapshot/cmd.go index 2775f838e3..e6096ff07e 100644 --- a/cmd/kanvas-snapshot/cmd.go +++ b/cmd/kanvas-snapshot/cmd.go @@ -166,7 +166,7 @@ func CreateMesheryDesign(uri, name, email string) (string, error) { } // Set headers and log them - req.Header.Set("Cookie", ProviderToken) + req.Header.Set("Cookie", fmt.Sprintf("token=%s;meshery-provider=Meshery", ProviderToken)) req.Header.Set("Origin", MesheryAPIBaseURL) req.Header.Set("Host", MesheryAPIBaseURL) req.Header.Set("Content-Type", "text/plain;charset=UTF-8") @@ -231,7 +231,7 @@ func GenerateSnapshot(designID, _, email, assetLocation string) error { return err } - req.Header.Set("Cookie", ProviderToken) + req.Header.Set("Cookie", fmt.Sprintf("provider_token=%s", ProviderToken)) req.Header.Set("Content-Type", "application/json") req.Header.Set("Referer", fmt.Sprintf("%s/dashboard", MesheryCloudAPIBaseURL))