I want to expose my in-development asp.net core web app so that I can demo it etc. I use ngrok to do this, but this doesn't seem to work with asp.net core. I get a 502 bad gateway error
I'm tunnelling with this command:
./ngrok tcp 5001
My web host builder code in program.cs
sets up kestrel as follows:
.UseKestrel(options =>
{
options.AddServerHeader = false;
options.Listen(IPAddress.Loopback, 5000);
options.Listen(IPAddress.Loopback, 5001, listenOptions =>
{
listenOptions.UseHttps("localhost.pfx", "SOMETHING");
});
})
So I can hit my web app with localhost or my local IP address, but via ngrok it fails.
Does anyone know why this is?