【发布时间】:2022-01-01 16:55:26
【问题描述】:
我在无 Db 模式下使用 Kong。我首先使用yaml config文件来配置服务,在doc中定义,像这样:
_format_version: "2.1"
_transform: true
services:
- name: controllers
url: https://10.5.131.142:3002
routes:
- name: controller-routes
paths:
- /admin/controllers
- name: vpnprofiles
url: https://10.5.131.142:3002
routes:
- name: vpnprofiles-routes
paths:
- /admin/vpnprofiles
- name: device_report
url: https://10.5.131.142:3000
routes:
- name: device-report-routes
paths:
- /reporting/device_report
但是,这不会设置用于向上游服务请求的路径。查看该字段时,它返回为 null。 我尝试使用 /config 端点重置配置,但未考虑“路径”字段。它不会被拒绝,但它不会更新字段。
有没有办法设置上游服务的路径?
【问题讨论】:
标签: kong