You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Kong注册服务与路由后匹配失败,请求解析strip_path属性应用

问题:Kong路由匹配失败及strip_path属性疑问

我已查阅Kong官方文档,成功注册了服务与路由,但调用Kong进行转发时出现错误。

已注册的服务信息

{"next": null,"data": [{"host": "testapp","id": "722f19aa-101d-586e-8ecc-13994d576b46","created_at": 1725516638,"path": null,"enabled": true,"write_timeout": 60000,"client_certificate": null,"tags": null,"ca_certificates": null,"port": 3003,"updated_at": 1725516638,"read_timeout": 60000,"name": "test_service_kong","protocol": "http","tls_verify": null,"connect_timeout": 60000,"tls_verify_depth": null,"retries": 5}]}

已注册的路由信息

{"next": null,"data": [{"path_handling": "v0","paths": ["/api/v1"],"id": "b8dc7e31-996f-50c8-9f40-0905e6703c27","sources": null,"created_at": 1725516638,"request_buffering": true,"strip_path": true,"destinations": null,"https_redirect_status_code": 426,"methods": ["GET"],"snis": null,"tags": null,"service": {"id": "722f19aa-101d-586e-8ecc-13994d576b46"},"updated_at": 1725516638,"hosts": null,"name": "test_route_kong","regex_priority": 0,"preserve_host": false,"response_buffering": true,"protocols": ["http","https"],"headers": null}]}

调用情况及错误

我调用Kong的地址为:http://localhost:8000/api/v1/,期望转发到http://localhost:3003/,但得到报错:

{"message":"no Route matched with those values"}

疑问

我查阅了strip_path相关文档,但理解模糊,想请教该属性在此场景下的具体应用方式。


内容的提问来源于stack exchange,提问作者Anisha Bhujbal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 19:57:18