jiangfucheng commented on code in PR #8790:
URL: https://github.com/apache/apisix/pull/8790#discussion_r1096947208
##########
apisix/plugins/request-id.lua:
##########
@@ -40,7 +40,9 @@ local schema = {
properties = {
header_name = {type = "string", default = "X-Request-Id"},
include_in_response = {type = "boolean", default = true},
- algorithm = {type = "string", enum = {"uuid", "snowflake", "nanoid"},
default = "uuid"}
+ algorithm = {type = "string", enum = {"uuid", "snowflake", "nanoid",
"random_id"}, default = "uuid"},
+ random_id_length = { type = "integer", minimum = 6, default = 16 },
Review Comment:
In https://github.com/apache/apisix/issues/8720 issue, the user needs a
random id that can satisfy the `[0-9a-f]{32}` regular expression. I think that
the character content and id length of other algorithms cannot meet the
requirements. In this "random_id" algorithm, users only need to set
random_id_strs="abcdef0123456789" and random_id_length=32 to meet the
requirements.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]