Added more randomization. The profile now supports setting keys to an array of strings, from which a random one is chosen each time (useful for e.g. Host header, etc.)

This commit is contained in:
Jakob Friedl
2025-08-17 16:27:48 +02:00
parent 22c15dd82c
commit 739faf781e
5 changed files with 50 additions and 30 deletions

View File

@@ -30,7 +30,12 @@ proc httpGet*(ctx: Context) {.async.} =
heartbeatString = ctx.request.getHeader(heartbeatHeader)[0]
of "parameter":
discard
let param = cq.profile.getString("http-get.agent.heartbeat.placement.name")
heartbeatString = ctx.getQueryParams(param)
if heartbeatString.len <= 0:
resp "", Http404
return
of "uri":
discard
of "body":