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 2021/05/26 01:26:12 UTC

[GitHub] [apisix-dashboard] hozaifaaoud opened a new issue #1919: Vars in uri

hozaifaaoud opened a new issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919


   How can I add vars in uri?
   And how can I create a route like this 
   Http://127.0.0.1:9080/tel/{TelNum}/email/{EmailAdd}


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



[GitHub] [apisix-dashboard] liuxiran commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
liuxiran commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-901630109


   > radixtree_uri_with_parameter is disabled by default. And it has a design defect: ':' is a valid character in the URL, so it is not recommended to enable it.
   
   thanks for @spacewander 's replay, also cc @imjoey @hozaifaaoud to kown.
   
   As vars in url is helpful for some users, I wonder if we have plan to Improve this feature?


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] github-actions[bot] commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-956103061


   This issue has been marked as stale due to 30 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] spacewander commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-901532009


   radixtree_uri_with_parameter is disabled by default. And it has a design defect: ':' is a valid character in the URL, so it is not recommended to enable it.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] iamayushdas edited a comment on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
iamayushdas edited a comment on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-848393359


   @starsz, @nic-chen have a look here.
   Thank you


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



[GitHub] [apisix-dashboard] liuxiran commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
liuxiran commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-900592090






-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] iamayushdas commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
iamayushdas commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-848393359


   @starsz have a look here.
   Thank you


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



[GitHub] [apisix-dashboard] starsz commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
starsz commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-848409251


   Add vars in uri is not support.
   
   But you can try to use var filed in route.
   refer: https://github.com/apache/apisix/blob/master/docs/en/latest/admin-api.md#route
   
   Like this:
   ```
    "vars": [["uri", "~~", "{your regex}"]],
   ```
   
    


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



[GitHub] [apisix-dashboard] imjoey commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-902403224


   > > radixtree_uri_with_parameter is disabled by default. And it has a design defect: ':' is a valid character in the URL, so it is not recommended to enable it.
   > 
   > thanks for @spacewander 's reply, also cc @imjoey @hozaifaaoud to kown.
   > 
   > As vars in url is helpful for some users, I wonder if we have plan to Improve this feature?
   
   That would be great. Uses could use these vars to design complicated route match rules, as well as request parameter rewrite.
   
   


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on issue #1919: support vars in URI

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-957037951


   AFAIK, no plan to support this, but PR is welcome.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] iamayushdas commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
iamayushdas commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-848389524


   Hey @hozaifaaoud have you tried it by adding route path as you stated.


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



[GitHub] [apisix-dashboard] nic-chen commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-848411685


   please refer to:
   
   https://github.com/apache/apisix/blob/master/docs/en/latest/router-radixtree.md#5-parameter-match
   
   https://github.com/api7/lua-resty-radixtree/#parameters-in-path
   


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



[GitHub] [apisix-dashboard] liuxiran commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
liuxiran commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-900592090


   Hi @hozaifaaoud , have our answers solved your problem? If not, please update more details, or we consider the problem solved and will close it after three days, thanks a lot


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] liuxiran commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
liuxiran commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-900961089


   > > please refer to:
   > > https://github.com/apache/apisix/blob/master/docs/en/latest/router-radixtree.md#5-parameter-match
   > > https://github.com/api7/lua-resty-radixtree/#parameters-in-path
   > 
   > @starsz @nic-chen @liuxiran
   > 
   > Hi all, according to the docs, the parameter `radixtree_uri_with_parameter` allows users to set `/blog/:name` as the uri which could match `/blog/dog` and `/blog/:cat`. I was wondering that if we can also use it in `regex_uri`? For example, if `regex_uri` is set to `[" /iresty/:p1/:p2/:p3", "/x:p1/y:p2/z:p3"]`, apisix could match request with `/iresty/name/age/gender` and rewrite the request url to `/xname/yage/zgender` and then send to the upstreams.
   > 
   > Looking forward to your feedbacks. Thanks.
   
   also cc @spacewander to help take a look, thanks a lot


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] imjoey commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-900857480


   > please refer to:
   > 
   > https://github.com/apache/apisix/blob/master/docs/en/latest/router-radixtree.md#5-parameter-match
   > 
   > https://github.com/api7/lua-resty-radixtree/#parameters-in-path
   
   @starsz  @nic-chen @liuxiran 
   
   Hi all, according to the docs, the parameter `radixtree_uri_with_parameter` allows users to set `/blog/:name` as the uri which could match `/blog/dog` and `/blog/:cat`. I was wondering that if we can also use it in `regex_uri`? For example, if `regex_uri` is set to `[" /iresty/:p1/:p2/:p3", "/x:p1/y:p2/z:p3"]`, apisix could match request with `/iresty/name/age/gender` and rewrite the request url to `/xname/yage/zgender` and then send to the upstreams.
   
   Looking forward to your feedbacks. Thanks.
   
   


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] iamayushdas edited a comment on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
iamayushdas edited a comment on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-848393359


   @starsz, @nic-chen, @imjoey, @juzhiyuan  have a look here.
   Thank you


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



[GitHub] [apisix-dashboard] github-actions[bot] commented on issue #1919: support vars in URI

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-984485188


   This issue has been marked as stale due to 30 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] github-actions[bot] closed issue #1919: support vars in URI

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919


   


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] github-actions[bot] commented on issue #1919: support vars in URI

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-996590926


   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on issue #1919: support vars in URI

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-957037951


   AFAIK, no plan to support this, but PR is welcome.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] hozaifaaoud commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
hozaifaaoud commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-956297660


   any good news


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] hozaifaaoud commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
hozaifaaoud commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-848392530


   Yes, and I am facing this issue 
   ![image](https://user-images.githubusercontent.com/79872781/119589884-059fb080-bdd4-11eb-9e66-7b4849580e09.png)
   


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



[GitHub] [apisix-dashboard] liuxiran edited a comment on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
liuxiran edited a comment on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-901630109


   > radixtree_uri_with_parameter is disabled by default. And it has a design defect: ':' is a valid character in the URL, so it is not recommended to enable it.
   
   thanks for @spacewander 's reply, also cc @imjoey @hozaifaaoud to kown.
   
   As vars in url is helpful for some users, I wonder if we have plan to Improve this feature?


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] iamayushdas edited a comment on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
iamayushdas edited a comment on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-848393359


   @starsz, @nic-chen, @imjoey  have a look here.
   Thank you


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



[GitHub] [apisix-dashboard] imjoey commented on issue #1919: Vars in uri

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-900857480


   > please refer to:
   > 
   > https://github.com/apache/apisix/blob/master/docs/en/latest/router-radixtree.md#5-parameter-match
   > 
   > https://github.com/api7/lua-resty-radixtree/#parameters-in-path
   
   @starsz  @nic-chen @liuxiran 
   
   Hi all, according to the docs, the parameter `radixtree_uri_with_parameter` allows users to set `/blog/:name` as the uri which could match `/blog/dog` and `/blog/:cat`. I was wondering that if we can also use it in `regex_uri`? For example, if `regex_uri` is set to `[" /iresty/:p1/:p2/:p3", "/x:p1/y:p2/z:p3"]`, apisix could match request with `/iresty/name/age/gender` and rewrite the request url to `/xname/yage/zgender` and then send to the upstreams.
   
   Looking forward to your feedbacks. Thanks.
   
   


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on issue #1919: support vars in URI

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1919:
URL: https://github.com/apache/apisix-dashboard/issues/1919#issuecomment-957037951


   AFAIK, no plan to support this, but PR is welcome.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org