Is there a simple way to allow the front-end and testing teams to easily override the host header to match {tenant}.mydomain.com while working locally? I'm looking for a solution that doesn't involve constant changes. Any ideas on how I can achieve this? Below is my .net 7 code for checking the host:
var host = Request.Host.Value;
if (string.IsNullOrEmpty(host))
{
return BadRequest("Missing host header.");
}
I've come across suggestions to use the hosts
file, but it seems like a rigid solution that would need adjustments every time we want to test a different tenant.