如何使 yarp 匹配路径不区分大小写?
How can I make yarp match path case insensitive?
我的路线是
"Routes": [
{
"RouteId": "routegreen",
"ClusterId": "clustergreen",
"Match": {
"Path": "/api/myendpoint"
}
}
它与发往 /api/MyEndpoint
的请求不匹配。是否可以使其不区分大小写?
你不能。这些不是 Windows 文件名 - URL 包含在路由中始终区分大小写。您别无选择,只能在路由地址或您的方法名称中重命名,以完全匹配大小写。
我的路线是
"Routes": [
{
"RouteId": "routegreen",
"ClusterId": "clustergreen",
"Match": {
"Path": "/api/myendpoint"
}
}
它与发往 /api/MyEndpoint
的请求不匹配。是否可以使其不区分大小写?
你不能。这些不是 Windows 文件名 - URL 包含在路由中始终区分大小写。您别无选择,只能在路由地址或您的方法名称中重命名,以完全匹配大小写。