You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/09/28 02:33:33 UTC

[GitHub] [apisix] Firstsawyou commented on a change in pull request #2333: feat: support to fetch `consumer_name` via `ctx.var`

Firstsawyou commented on a change in pull request #2333:
URL: https://github.com/apache/apisix/pull/2333#discussion_r495660718



##########
File path: apisix/core/ctx.lua
##########
@@ -96,6 +96,9 @@ do
             elseif key == "service_id" then
                 val = ngx.ctx.api_ctx and ngx.ctx.api_ctx.service_id
 
+            elseif key == "consumer_name" then
+                val = ngx.ctx.api_ctx and ngx.ctx.api_ctx.consumer_id

Review comment:
       `consumer_id` and `consumer_name` are the same string type value. After processing the "consumer_id" in the core code "ctx.lua" file here, all users will see the "consumer_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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org