Skip to content

Commit

Permalink
Track telemetry download events for GET requests only (#132)
Browse files Browse the repository at this point in the history
Signed-off-by: Kim Tsao <ktsao@redhat.com>

Signed-off-by: Kim Tsao <ktsao@redhat.com>
  • Loading branch information
kim-tsao committed Sep 2, 2022
1 parent b579f98 commit 4e2a0cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index/server/pkg/server/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e2a0cb

Please sign in to comment.