[英]YARP - How to modify subapplication path?
I have the following IIS site:我有以下 IIS 站点:
Calling www.site.com/Login redirects correctly to the page in my subapplication, the browser bar shows www.site.com/Login .调用www.site.com/Login会正确重定向到我的子应用程序中的页面,浏览器栏显示www.site.com/Login 。
But, calling www.site.com , redirects to www.site.com/subapplication/Login , it also works, but I want www.site.com to show www.site.com/Login in the browser bar.但是,调用www.site.com ,重定向到www.site.com/subapplication/Login ,它也可以工作,但我希望www.site.com在浏览器栏中显示www.site.com/Login 。
www.site.com is a .NET Core site with YARP www.site.com是带有 YARP 的 .NET 核心站点
www.site.com/subapplication/Login is a .NET Framework site www.site.com/subapplication/Login是一个 .NET 框架站点
"ReverseProxy": {
"Routes": {
"fallbackRoute": {
"ClusterId": "fallbackCluster",
"Order": "1",
"Match": {
"Path": "{**catch-all}"
},
"Transforms": [
{ "PathRemovePrefix": "/web" }
{ "RequestHeaderOriginalHost": "true" }
]
}
},
"Clusters": {
"fallbackCluster": {
"Destinations": {
"fallbackApp": {
"Address": "https://dansaleswebdev.danone.com.br/dev/web/"
}
}
}
}
}
www.site.com redirect to www.site.com/Login instead of www.site.com/subapplication/Login www.site.com重定向到www.site.com/Login而不是www.site.com/subapplication/Login
I already tried to add the PathRemovePrefix transformation to remove /subapplication but it not worked.我已经尝试添加PathRemovePrefix 转换以删除 /subapplication 但它不起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.