feat: Do not send metrics if the client used DNT or GPC
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -124,7 +124,7 @@ func ServeFile(context *context.Context) {
|
||||
context.Writer.Write(content)
|
||||
|
||||
// Tell Loki about if, if desired
|
||||
if context.Global.MetricConfig.ShouldSendMetrics(path, context.UserAgent) {
|
||||
if context.Global.MetricConfig.ShouldSendMetrics(path, context.UserAgent, context.DNT, context.GPC) {
|
||||
context.Global.MetricConfig.SendMetricPing(context.Domain, path, context.Referrer)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user