From 9e3d7ef91cc225406ba00c93412060839d551ed2 Mon Sep 17 00:00:00 2001 From: Kim Tsao Date: Mon, 29 Aug 2022 17:38:00 -0400 Subject: [PATCH] Track telemetry download events for GET requests only Signed-off-by: Kim Tsao --- index/server/pkg/server/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index/server/pkg/server/index.go b/index/server/pkg/server/index.go index f507c9af..184ce731 100644 --- a/index/server/pkg/server/index.go +++ b/index/server/pkg/server/index.go @@ -171,8 +171,8 @@ func ociServerProxy(c *gin.Context) { proxy := httputil.NewSingleHostReverseProxy(remote) // Set up the request to the proxy - // Track event for telemetry - if enableTelemetry { + // Track event for telemetry for GET requests only + if enableTelemetry && c.Request.Method == http.MethodGet { proxyPath := c.Param("proxyPath") if proxyPath != "" { var name string