🐛 Fix sphere webpage load issue
This commit is contained in:
2
DysonNetwork.Sphere/.gitignore
vendored
2
DysonNetwork.Sphere/.gitignore
vendored
@@ -7,3 +7,5 @@ bun.lock
|
|||||||
package-lock.json
|
package-lock.json
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
wwwroot/dist
|
||||||
|
@@ -71,7 +71,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Discovery\"/>
|
<Folder Include="Discovery\"/>
|
||||||
<Folder Include="wwwroot\" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@@ -6,6 +6,7 @@ using DysonNetwork.Sphere;
|
|||||||
using DysonNetwork.Sphere.PageData;
|
using DysonNetwork.Sphere.PageData;
|
||||||
using DysonNetwork.Sphere.Startup;
|
using DysonNetwork.Sphere.Startup;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.Extensions.FileProviders;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
@@ -51,4 +52,12 @@ app.ConfigureAppMiddleware(builder.Configuration);
|
|||||||
|
|
||||||
app.MapGatewayProxy();
|
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();
|
app.Run();
|
Reference in New Issue
Block a user