Add configurable debug mode

This commit is contained in:
Daniel_I_Am 2020-08-23 14:44:21 +02:00
parent f474509a8e
commit 4f4075c8f4
No known key found for this signature in database
GPG Key ID: 80C428FCC9743E84

View File

@ -36,8 +36,11 @@ namespace ChaosBot.WebServer
{
_logger.Info("Initializing Kestrel Startup and Configuration");
app.UseForwardedHeaders();
if (Program.AppSettingsHandler.GetValue<bool>("WebServer:Debug", false))
app.UseDeveloperExceptionPage();
app.UseForwardedHeaders();
app.UseMiddleware<AuthenticationMiddleware>();
app.UseRouting();
app.UseAuthorization();