You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by 15717900 <15...@qq.com> on 2020/04/23 06:41:31 UTC
On the abstraction of vars
hi,
There are multiple routes, using the same vars, such as [["cookie_user", "==", "1"]], which take effect on both "/user" and "/pages" routes. If you abstract out vars and manage them separately, you don't need to modify their vars one by one, just one place.
Re: On the abstraction of vars
Posted by Zhiyuan Ju <ju...@apache.org>.
Hi,
I see there have too many characters to read, would you please send it
again?
15717900 <15...@qq.com>于2021年3月18日 周四下午1:17写道:
> 您好:
> sorry I leaved out this email
> The description in your email is accurate. That's what I mean
>
>
> do we allow to enable `vars` and` vars_id` at the same time?
> on this question , I think it is necessary allow to
> enable `vars` and` vars_id` at the same time
>
>
> ------------------ 原始邮件 ------------------
> 发件人:
> "dev"
> <
> membphis@apache.org>;
> 发送时间: 2020年4月28日(星期二) 中午11:06
> 收件人: "dev@apisix.apache.org"<dev@apisix.apache.org>;
>
> 主题: Re: On the abstraction of vars
>
>
>
> can you provide an example to implement this feature?
>
> If it is an abstraction of vars, then I understand it should look like
> this:
>
> ```
> route:
> {
> uri: "/ test1",
> vars_id: var_1,
> ...
> },
> {
> uri: "/ test2",
> vars_id: var_1,
> ...
> },
>
> vars:
> {
> id: var_1
> values: [
> ["cookie_user", "==", "1"]
> ]
> }
> ```
>
> BTW, do we allow to enable `vars` and` vars_id` at the same time?
>
>
>
> On Thu, Apr 23, 2020 at 2:44 PM 15717900 <15717900@qq.com> wrote:
>
> > hi,
> > &nbsp; &nbsp; &nbsp;There are multiple routes, using the
> same vars, such
> > as [["cookie_user", "==", "1"]], which take effect on both "/user" and
> > "/pages" routes. If you abstract out vars and manage them separately,
> you
> > don't need to modify their vars one by one, just one place.
>
>
>
> --
> *MembPhis*
> My github: https://github.com/membphis
> Apache APISIX: https://github.com/apache/incubator-apisix
--
来自 琚致远
回复: On the abstraction of vars
Posted by 15717900 <15...@qq.com>.
您好:
sorry I leaved out this email
The description in your email is accurate. That's what I mean
do we allow to enable `vars` and` vars_id` at the same time?
on this question , I think it is necessary allow to enable `vars` and` vars_id` at the same time
------------------ 原始邮件 ------------------
发件人: "dev" <membphis@apache.org>;
发送时间: 2020年4月28日(星期二) 中午11:06
收件人: "dev@apisix.apache.org"<dev@apisix.apache.org>;
主题: Re: On the abstraction of vars
can you provide an example to implement this feature?
If it is an abstraction of vars, then I understand it should look like this:
```
route:
{
uri: "/ test1",
vars_id: var_1,
...
},
{
uri: "/ test2",
vars_id: var_1,
...
},
vars:
{
id: var_1
values: [
["cookie_user", "==", "1"]
]
}
```
BTW, do we allow to enable `vars` and` vars_id` at the same time?
On Thu, Apr 23, 2020 at 2:44 PM 15717900 <15717900@qq.com> wrote:
> hi,
> &nbsp; &nbsp; &nbsp;There are multiple routes, using the same vars, such
> as [["cookie_user", "==", "1"]], which take effect on both "/user" and
> "/pages" routes. If you abstract out vars and manage them separately, you
> don't need to modify their vars one by one, just one place.
--
*MembPhis*
My github: https://github.com/membphis
Apache APISIX: https://github.com/apache/incubator-apisix
Re: On the abstraction of vars
Posted by YuanSheng Wang <me...@apache.org>.
can you provide an example to implement this feature?
If it is an abstraction of vars, then I understand it should look like this:
```
route:
{
uri: "/ test1",
vars_id: var_1,
...
},
{
uri: "/ test2",
vars_id: var_1,
...
},
vars:
{
id: var_1
values: [
["cookie_user", "==", "1"]
]
}
```
BTW, do we allow to enable `vars` and` vars_id` at the same time?
On Thu, Apr 23, 2020 at 2:44 PM 15717900 <15...@qq.com> wrote:
> hi,
> There are multiple routes, using the same vars, such
> as [["cookie_user", "==", "1"]], which take effect on both "/user" and
> "/pages" routes. If you abstract out vars and manage them separately, you
> don't need to modify their vars one by one, just one place.
--
*MembPhis*
My github: https://github.com/membphis
Apache APISIX: https://github.com/apache/incubator-apisix