🐛 Fix sphere webpage load issue
This commit is contained in:
@@ -6,6 +6,7 @@ using DysonNetwork.Sphere;
|
||||
using DysonNetwork.Sphere.PageData;
|
||||
using DysonNetwork.Sphere.Startup;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -51,4 +52,12 @@ app.ConfigureAppMiddleware(builder.Configuration);
|
||||
|
||||
app.MapGatewayProxy();
|
||||
|
||||
app.UseDefaultFiles();
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(Path.Combine(app.Environment.ContentRootPath, "wwwroot", "dist"))
|
||||
});
|
||||
|
||||
app.MapPages(Path.Combine(app.Environment.WebRootPath, "dist", "index.html"));
|
||||
|
||||
app.Run();
|
Reference in New Issue
Block a user