浏览代码

修改cloudflare推送日志的字段

ChenHaolong 1 年之前
父节点
当前提交
f48530d2fb
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      server/LogPushCloudflareServer.go

+ 3 - 3
server/LogPushCloudflareServer.go

@@ -66,9 +66,9 @@ func (s *LogPushCloudflareServer) CreateLogPushJobByZoneId(ctx context.Context,
 		DestinationConf: requestCloudflare.GetDestinationConf(),
 		Enabled:         true,
 		Frequency:       "low",
-		LogpullOptions: "fields=RayID,ZoneName," +
-			"ClientCountry,ClientIP,ClientRequestBytes,ClientRequestHost,ClientRequestPath," +
-			"EdgeResponseStatus,EdgeResponseBytes,EdgeStartTimestamp,EdgeEndTimestamp&timestamps=rfc3339",
+		LogpullOptions: "fields=ClientIP,ClientCountry,ClientRequestMethod,ClientRequestProtocol," +
+			"ClientRequestHost,ClientRequestPath,ClientRequestURI,EdgeResponseStatus,EdgeResponseBytes,ClientRequestUserAgent," +
+			"CacheCacheStatus,CacheResponseBytes,EdgeStartTimestamp,EdgeEndTimestamp&timestamps=rfc3339,",
 		OwnershipChallenge: requestCloudflare.GetOwnershipChallenge(),
 	}
 	result, err := api.CreateZoneLogpushJob(ctxAPI, requestCloudflare.GetZoneId(), job)