Skip to content

Commit 4e2a0cb

Browse files
authored
Track telemetry download events for GET requests only (#132)
Signed-off-by: Kim Tsao <[email protected]> Signed-off-by: Kim Tsao <[email protected]>
1 parent b579f98 commit 4e2a0cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index/server/pkg/server/index.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ func ociServerProxy(c *gin.Context) {
171171
proxy := httputil.NewSingleHostReverseProxy(remote)
172172

173173
// Set up the request to the proxy
174-
// Track event for telemetry
175-
if enableTelemetry {
174+
// Track event for telemetry for GET requests only
175+
if enableTelemetry && c.Request.Method == http.MethodGet {
176176
proxyPath := c.Param("proxyPath")
177177
if proxyPath != "" {
178178
var name string

0 commit comments

Comments
 (0)