Closed marenfis closed 4 weeks ago
Can you share the YARP configuration you're using? What do you see from the logs - are the requests being rejected by the proxy or by the backend service?
``Here is the config I'm using (appsettings.json):
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ReverseProxy": {
"Routes": {
"route1": {
"ClusterId": "cluster1",
"Match": {
"Path": "{**catch-all}"
}
}
},
"Clusters": {
"cluster1": {
"Destinations": {
"destination1": {
"Address": "https://example.com/"
}
}
}
}
}
}
And the log I got:
info: Yarp.ReverseProxy.Forwarder.HttpForwarder[9]
Proxying to https://example.com/igor HTTP/2 RequestVersionOrLower
info: Yarp.ReverseProxy.Forwarder.HttpForwarder[56]
Received HTTP/1.1 response 500.
What behavior were you expecting?
It seems like you've asked YARP to proxy requests as-is, and the proxy returned whatever response example.com
returned for that path.
Seems I didn't understand how it works. I was expecting that the path is not included in the forwarded request:
https://localhost/test is forwarded to https://example.com
instead, the request ist forwarded to https://example.com/test - of course.
Sorry for that stupid issue ...
Describe the bug
I started exploring YARP using the documentation https://microsoft.github.io/reverse-proxy/articles/getting-started.html. If I try the url https://localhost/test, /prod or /hugo, everything works as expected while other paths like /igor or /tryout are not working
To Reproduce
Further technical details