reverse-proxy icon indicating copy to clipboard operation
reverse-proxy copied to clipboard

Strange behavior of Request.Url

Open mrcferri opened this issue 2 years ago • 2 comments

I use YARP in a progressive migration with a ASP.NET CORE site (new.site.com) and a framework site (legacy.site.com) and I call Request.Url in a controller of the legacy site.

On my development machine (Windows 11) it correctly returns the url new.site.com, instead on my production machine (Windows Server 2019) it returns legacy.site.com.

Tried everything, but I can't understand why. Hope you can help me. Thanks.

Mark

mrcferri avatar Apr 15 '24 11:04 mrcferri

@mrcferri Are you using the System.Web Adapters for this? I assume so based on the scenario you described. If so, can you please post this question in the repo for the adapters? https://github.com/dotnet/systemweb-adapters/issues

This doesn't seem like a YARP issue.

adityamandaleeka avatar Apr 16 '24 17:04 adityamandaleeka

@adityamandaleeka You're perfectly right. I didn't realize that sytemweb-adapters should be added in the modules section of the web.config of the legacy site.

mrcferri avatar Apr 17 '24 09:04 mrcferri