Open conficient opened 1 year ago
I did consider whether HTTP/2 might be an issue so I limited the WebForms app to HTTP/1.1, this didn't change anything
I suspect this is something Azure related: I tried moving the Blazor project to a Linux host which is on a different IP. It was unable to talk to the WebForm app. I will search in the YARP issues to see if there are any known problems...
Posted an issue on the Reverse-Proxy repository and fortunately someone hit on the right solution.
When forwarding the request to the destination, the headers (including the Host
value) are copied. Since the Azure App Service hosts many sites on the same IP it uses DNS and the Host header (I believe) to resolve which App Service to route the traffic to.
Since the Host
value and the URL were in conflict I believe the router refused the request - hence the 400 error.
I've added a fix to the RedirectTransformer
and will send a pull request for it
We have a legacy WebForms app and Blazor Server front-end using Cocoon successfully for a year. It's hosted on our own servers at present and its working perfectly.
Problem
I'm trying to port the same code to be hosted on Azure. I've set up two App Services running in the same service plan (both as Windows hosts). One is running the WebForm app (on .NET Framework 4.8) and the other running Blazor (on .NET 6).
Both apps are up and running independently, but if I try to access a Cocoon page from the Blazor app, it returns a 400 error.
This is the case even if I try to request a static resource, e.g.
/img/Test.jpg
. This exists on the WebForm app, but it fails and returns a 400 error. From the Blazor site log (below) I can see that it Initially tries to request the/facadeauth
route on the target, even though it's accessing a static file, which returns a 401 error. I can query the URL on the webform site, e.g.https://webform-site-url/img/Test.jpg
and it works.Any ideas??