Closed Edward-Zhou closed 3 years ago
Try this appsettings.json
"ReverseProxy": {
"Routes": [
{
"RouteId": "route1",
"ClusterId": "cluster1",
"Match": {
"Path": "{**catch-all}"
},
"Transforms": [
{ "PathSet" : "tmp/wxf7af440ff55eb16f.o6zAJsykdr1no9f31bqQnFXBUmKI.F7XNsEHOYMgx55299128c977791aee009dd04aaf9ef6.mp4" }
]
}
],
"Clusters": {
"cluster1": {
"Destinations": {
"cluster1/destination1": {
"Address": "http://qiniu.meekou.cn/"
}
}
}
}
}
The Destination Address field is a prefix that the current request path is appended to by default. The current request path in your sample must have been "/", so it was appended to the destination path. Note a request path always has at least "/". @Kahbazi gave a good solution here, re-writing the path.
Triage: Solved above.
Describe the bug
I am trying to redirect request to another domain to request static files like mp4 file. But it will append the "/" to the redirect request which cause the server fail to find the document
To Reproduce
asp.net core appsettings.json
The Debug output is
The proxy target is appending the "/" to the last.
Is there any way to avoid the "/"?