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/02/11 15:50:25 UTC

[GitHub] [incubator-apisix] leehomewl commented on issue #1120: set variable inoperative!!

leehomewl commented on issue #1120: set variable inoperative!!
URL: https://github.com/apache/incubator-apisix/issues/1120#issuecomment-584702524
 
 
   我打算加入  srcache-nginx-module的模块进来, 我在openresty 上 用rewrite_by_lua 就非常正常。
   但是我在 apisix 上使用的 插件的plugins 的rewrite 就无法成功, 每次赋值都好像执行阶段顺序没有对, 有遇到这种类似的情况的吼一下,谢谢
   
    location /test_foo {
        set $key $uri$args;
        srcache_fetch GET /memc $key;
        srcache_store PUT /memc $key;
        srcache_store_statuses 200 301 302;
   
   
       set $fetch_skip '1';
       set $store_skip '1';
   
       rewrite_by_lua '
            ngx.var.fetch_skip = 0
            ngx.var.store_skip = 0
       ';
   
       srcache_fetch_skip $fetch_skip;
       srcache_store_skip $store_skip;
   
        proxy_pass  http://192.168.12.148:81;
       }
   }
   

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


With regards,
Apache Git Services