starsz commented on issue #5634: URL: https://github.com/apache/apisix/issues/5634#issuecomment-982195527
> What about allowing user to register their var in > > https://github.com/apache/apisix/blob/8f0b066c86257ad6af19f9b3b7e209ece95d17c9/apisix/core/ctx.lua#L147 > > ? I think support function would be more flexible. We can write the function like this: ``` function generate_key(ctx) if ctx.var.http_x_consumer == "a" then return "a" end return "default" end ``` Then we can limit the specific request with a special header. -- 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-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org