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:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user