leehomewl opened a new issue #1120: set variable inoperative!!
URL: https://github.com/apache/incubator-apisix/issues/1120
 
 
   Hi:
       我开发一个插件, 我在 bin/apisix 中加入初始化变量,我发现一个奇怪的问题:
   如果 我设置这个变量为为空的时候
      location / {
              ......
               set $skip '';
               ......
      }
    我可以在插件 /lua/apisix/plugins目录下通过下面的rewrite阶段去修改这个变量, 并且后面的服务可以用到修改后的值。 是正常的
   
   function _M.rewrite(conf, ctx)
       ngx_var.skip = 0
   end
   
   但如果我改成下面的情况, 初始化这个值得时候设置为1 ,此时,我的插件就不其作用了,修改后的值似乎没有生效, 我测试了很多遍, 一直无法解决。  
能帮忙确认下是什么原因吗?
   
      location / {
              ......
               set $skip 1 ;
               ......
      }
   
   
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to