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 2019/12/06 09:08:59 UTC

[GitHub] [incubator-apisix] simplechen opened a new issue #944: request help: 插件扩展可行性咨询

simplechen opened a new issue #944: request help: 插件扩展可行性咨询
URL: https://github.com/apache/incubator-apisix/issues/944
 
 
   HI:
     我们公司现有有一个正在使用的网关标准如下,现在想看看是否可以通过写apisix plugin 实现。
   
   - 接口标准
   
   1. 接口调用统一地址
   > http://127.0.0.1:8080/default
   
   2. 调用方法
   > POST
   
   3. 请求参数 http request body
   ```
   /* 头部信息 用于服务定位及身份认证 */
   {
     "head": {
       "service_code": "000100010001",
       "token": "88c91dd128484c8e8addc53a12f5411c"
     },
   /* body 为变参 根据服务不同参数不同,是一个json结构 */
     "body": {
     'uid':1
       }
   }
   ```
   
   -  想法
    上述head.service_code为12位编码,前4位对应于一个应用服务(可部署在份),这和apisix是的route是相悖的,我现在想法是否有可能apisix只写一个route,通过plugin解析里面的json参数拿到服务所在的upstream进而进行分发。
   
   多谢了

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