Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
UnicodingUnicorn committed Aug 29, 2019
1 parent 8229a25 commit dfbbb1f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/UniversalDashboard/Server/ServerStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ public void Configure(IApplicationBuilder app, Microsoft.AspNetCore.Hosting.IHos
ContentTypeProvider = provider
});

app.UseHttpsRedirection();
var dashboardService = app.ApplicationServices.GetService(typeof(IDashboardService)) as IDashboardService;

var dashboardService = app.ApplicationServices.GetService(typeof(IDashboardService)) as IDashboardService;
if (dashboardService?.DashboardOptions?.Certificate != null || dashboardService?.DashboardOptions?.CertificateFile != null) {
app.UseHttpsRedirection();
}

if (dashboardService?.DashboardOptions?.PublishedFolders != null) {
foreach(var publishedFolder in dashboardService.DashboardOptions.PublishedFolders) {
Expand Down

0 comments on commit dfbbb1f

Please sign in to comment.