starsz commented on a change in pull request #6160:
URL: https://github.com/apache/apisix/pull/6160#discussion_r790785931



##########
File path: apisix/plugins/request-id.lua
##########
@@ -214,6 +214,8 @@ function _M.rewrite(conf, ctx)
     local uuid_val = get_request_id(conf.algorithm)
     if not headers[conf.header_name] then
         core.request.set_header(ctx, conf.header_name, uuid_val)
+    else
+        uuid_val = headers[conf.header_name]

Review comment:
       I think we can avoid calling get_request_id if the id exists.




-- 
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]


Reply via email to