0

I'm using Net 5 and I want to set up a new domain on our application. What I'd like to happen is to be able to create the following routes:

I'd like these 2 routes to go to different views. I'd also like to be able to restrict certain pages e.g. www.domaina.com/pageA wouldn't be accessible from www.domainb.com/pageA and vice versa. I've tried to decorate my methods and controllers with the new "Host" attribute but that doesn't seem to retrict them. I've also tried methods from here to no avail: Domain-based routing in ASP.NET Core 2.0

I should also point out that the plan is to have these behind Azure Front Door, so I need to pull from the header "X-Forwarded-Host". I have logic to do this already in place, but would need something I can customise. I'm using attribute based routing at the moment.

Any help would be greatly appreciated.

Thanks, David

David Hendrick
  • 93
  • 2
  • 13

0 Answers0