You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "tokers (via GitHub)" <gi...@apache.org> on 2023/01/31 08:56:06 UTC
[GitHub] [apisix] tokers commented on a diff in pull request #8758: feat(request-id): support get request-id from query string
tokers commented on code in PR #8758:
URL: https://github.com/apache/apisix/pull/8758#discussion_r1091624831
##########
apisix/plugins/request-id.lua:
##########
@@ -218,7 +219,18 @@ function _M.rewrite(conf, ctx)
local headers = ngx.req.get_headers()
local uuid_val
if not headers[conf.header_name] then
- uuid_val = get_request_id(conf.algorithm)
+ -- request-id support get from query string
+ if conf.get_from_query then
+ local querystring = ngx.req.get_uri_args()
+ if not querystring[conf.header_name] then
Review Comment:
It's weird to use the `header_name` to indicate the query name.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org