aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Main/Startup.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/Main/Startup.cs b/Main/Startup.cs
index 6e26943..2722747 100644
--- a/Main/Startup.cs
+++ b/Main/Startup.cs
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.EntityFrameworkCore;
@@ -47,12 +48,13 @@ namespace Server {
}
app.UseDefaultFiles();
- app.UseStaticFiles(
- Path.Combine(
+ string website_path = Path.Combine(
Directory.GetParent(Directory.GetCurrentDirectory()).ToString(),
- "Website"
- )
- );
+ "Website");
+ app.UseStaticFiles(new StaticFileOptions {
+ FileProvider = new PhysicalFileProvider(website_path),
+ RequestPath = "/test"
+ });
app.UseHangfireDashboard();
app.UseHangfireServer();