mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-11 00:09:06 +00:00
Enabled static file embedding
This commit is contained in:
parent
3b4d44dbe6
commit
58f8875015
@ -1,8 +1,12 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
|
||||||
using AIStudio;
|
using AIStudio;
|
||||||
using AIStudio.Components;
|
using AIStudio.Components;
|
||||||
using AIStudio.Settings;
|
using AIStudio.Settings;
|
||||||
using AIStudio.Tools;
|
using AIStudio.Tools;
|
||||||
|
|
||||||
|
using Microsoft.Extensions.FileProviders;
|
||||||
|
|
||||||
using MudBlazor;
|
using MudBlazor;
|
||||||
using MudBlazor.Services;
|
using MudBlazor.Services;
|
||||||
|
|
||||||
@ -31,13 +35,16 @@ builder.Services.AddRazorComponents()
|
|||||||
x.MaximumReceiveMessageSize = null;
|
x.MaximumReceiveMessageSize = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.WebHost.UseKestrel();
|
|
||||||
builder.WebHost.UseWebRoot("wwwroot");
|
|
||||||
builder.WebHost.UseStaticWebAssets();
|
|
||||||
builder.WebHost.UseUrls("http://localhost:5000");
|
builder.WebHost.UseUrls("http://localhost:5000");
|
||||||
|
|
||||||
|
var fileProvider = new ManifestEmbeddedFileProvider(Assembly.GetAssembly(type: typeof(Program))!, "wwwroot");
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles(new StaticFileOptions
|
||||||
|
{
|
||||||
|
FileProvider = fileProvider,
|
||||||
|
RequestPath = string.Empty,
|
||||||
|
});
|
||||||
|
|
||||||
app.UseAntiforgery();
|
app.UseAntiforgery();
|
||||||
app.MapRazorComponents<App>()
|
app.MapRazorComponents<App>()
|
||||||
.AddInteractiveServerRenderMode();
|
.AddInteractiveServerRenderMode();
|
||||||
|
Loading…
Reference in New Issue
Block a user