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/02/06 08:41:12 UTC

[GitHub] [apisix-dashboard] mdh67899 commented on issue #1428: why apisix dashboard Path limit must Begin with / , and * can only at the end ?

mdh67899 commented on issue #1428:
URL: https://github.com/apache/apisix-dashboard/issues/1428#issuecomment-774426163


   我用apisix的api接口提交下面路由规则是没问题的,请求也可以正常的路由到后端服务。为什么dashboard上添加路由规则的时候path不支持使用*开头呢?
   
   用这样的路由可能会导致路由效率低一些,但是有些场景下前后端交互,后端接口需要在路由里加上一些特殊信息,不能做到绝对的前缀匹配,比如```http://test.com/10/1.8.10/hello/index.html```这个url, 10和1.8.10是前后端约定有特殊含义的版本信息,这个是不固定的
   
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "uri": "*/hello/*",
       "hosts": ["test.com"],
       "upstream_id": 100
   }'
   ```


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