def customReplace(toArray):
ret = ArrayList()
customPrefix = "#{AUTHMATRIX:"
for to in toArray:
toNew = to
if customPrefix in to:
if customPrefix+"RANDOM}" in to:
# This will produce a random 4 char numeric string
# Most common use case is for APIs that reject requests that are identical to a previous request
randomString = ''.join(random.choice(string.digits) for _ in range(4))
toNew = to.replace(customPrefix+"RANDOM}",randomString)
ret.add(toNew)
return ret
##
## DB Class that holds all configuration data
##
评论列表
文章目录