kingluo commented on issue #7872:
URL: https://github.com/apache/apisix/issues/7872#issuecomment-1240459388

   > @kingluo if I use function which shared with me in below, apisix return 
http 500 all my requests.
   > 
   > `["local lr = require(\"apisix.plugins.limit-req\"); local limits = 
{xxx=1, yyy=50}; return function(conf, ctx) if ctx.var.http_X-netmera_api_key 
and limits[ctx.var.http_X-netmera_api_key] then ctx.conf_id = ctx.conf_id .. 
\"&\" .. ctx.var.http_X-netmera_api_key; local rate = 
limits[ctx.var.http_X-netmera_api_key]; return lr.access({rate = rate, burst = 
rate, rejected_code = 503, key_type = \"var\", key = 
\"http_X-netmera_api_key\"}, ctx); end; end"]`
   
   How did you configure apisix?
   I test it in my local env.
   Could you provide error.log?


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