Skip to content

Commit

Permalink
Add option to disable https redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-jung committed Dec 13, 2019
1 parent 6706618 commit a716287
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions WoL/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseHsts();
}

app.UseHttpsRedirection();
if (Configuration.GetValue<bool>("RequireHttps", true))
app.UseHttpsRedirection();

app.UseStaticFiles();

app.UseRouting();
Expand All @@ -89,9 +91,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
});

if (Configuration.GetValue<bool>("AutoUpdateDatabase", false))
{
UpdateDatabase(app);
}
}

private static void UpdateDatabase(IApplicationBuilder app)
Expand Down
3 changes: 2 additions & 1 deletion WoL/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
}
},
"AllowedHosts": "*",
"AutoUpdateDatabase": true
"AutoUpdateDatabase": true,
"RequireHttps": false
}

0 comments on commit a716287

Please sign in to comment.