From c2c9dc03b3a8e6ed543210e360fd3e9a35a8c4af Mon Sep 17 00:00:00 2001 From: Pijus Kamandulis Date: Thu, 9 Jan 2025 20:19:28 +0200 Subject: [PATCH] Fixed issue with wrong signature generation for pkrange requests --- api/handlers/middleware/authentication.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/handlers/middleware/authentication.go b/api/handlers/middleware/authentication.go index 5f94ce5..380f576 100644 --- a/api/handlers/middleware/authentication.go +++ b/api/handlers/middleware/authentication.go @@ -75,7 +75,8 @@ func requestToResourceId(c *gin.Context) string { isFeed := c.Request.Header.Get("A-Im") == "Incremental Feed" if resourceType == "pkranges" && isFeed { - resourceId = collId + // CosmosSDK replaces '/' with '-' in resource id requests + resourceId = strings.Replace(collId, "-", "/", -1) } return resourceId