Greenthy
Aspire YARP custom domain instead of localhost
I have a legacy solution which we are migrating from IIS to aspire (after upgrading to dotnet 8).
Our solution relies on hosting on a single domain, so to ensure this we've added a YARP project to do the necessary reverse proxying from the different projects.
This works well, and we are able to navigate to for instance the swagger pages.
As mentioned though, we rely on running behind a custom domain, which we added to our host file. However we cannot seem to get the custom domain working on the aspire YARP project.
We've tried https://anthonysimmon.com/dotnet-aspire-non-localhost-endpoints/ but this only adds the custom domain in the dashboard. We appear to need to hook it up into the yarp project. But we can't seem to find the correct info on how to do this. (And potentially also how to 'terminate' HTTPS on YARP)
Any help is greatly appreciated.
14 replies