kong - Kong Regex 用于替换 URI 中的字符串
问题描述
我正面临一个可用的“strip_path”功能的特殊问题
**Service Name**: application-svc
**Service Path**: /application
**Route for Service**: application-route
**Route Path**: /
**Strip_Path**: True
**Backend API**: /openapi
**Expected**:
calls made to www.xyz.com/applications/openapi will transform the url
from: www.xyz.com/applications/openapi
to: www.xyz.com/openapi
**Actual Result**:
calls made to www.xyz.com/applications/openapi end up with www.xyz.com/applicationsapplications/openapi
有人可以帮忙吗?
解决方案
Strip_Path 与 Route Path 相关,而不是 Route 和 Service Path。
要解决您的问题,请使用以下命令:
**Service Name**: application-svc
**Service Path**:
**Route for Service**: application-route
**Route Path**: /applications
**Strip_Path**: True
**Backend API**: /openapi
**Expected**:
calls made to www.xyz.com/applications/openapi will transform the url
from: www.xyz.com/applications/openapi
to: www.xyz.com/openapi
**Actual Result**:
calls made to www.xyz.com/applications/openapi end up with
www.xyz.com/openapi
推荐阅读
- tsql - 连接两个表时需要多个条件的真假答案
- delphi - 为什么CopyRect在delphi 10.3中翻转了第二张图片?
- python - 如何在 Cython 中返回 C++ 包装的对象
- java - 如何为算术计算java解析器编写递归while循环
- c# - MSTest:测试分组
- x509certificate - 如何在 Corda 中手动生成网络参数
- matrix - CPLEX 无法从 Excel 文件中读取数据,因为矩阵太大?
- hadoop - 如何将 presto 集群集成到 hadoop 集群?
- javascript - 意外的 redux 操作结果
- flutter - Flutter:在 Navigation.push 发生时保持 Row 存活