We have distributed web application that our customers host on premise and we want to remove the options of starting it without https. We only allow configuration using the "kestrel" section in appsettings.json and we basically want the app to throw an error on startup and then shut down if there's no valid https-endpoint in the configuration.
We already have UseHttpsRedirection() which gives a warning but doesn't force the app to terminate.