mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 14:49: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.Components;
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Tools;
|
||||
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
|
||||
using MudBlazor;
|
||||
using MudBlazor.Services;
|
||||
|
||||
@ -31,13 +35,16 @@ builder.Services.AddRazorComponents()
|
||||
x.MaximumReceiveMessageSize = null;
|
||||
});
|
||||
|
||||
builder.WebHost.UseKestrel();
|
||||
builder.WebHost.UseWebRoot("wwwroot");
|
||||
builder.WebHost.UseStaticWebAssets();
|
||||
builder.WebHost.UseUrls("http://localhost:5000");
|
||||
|
||||
var fileProvider = new ManifestEmbeddedFileProvider(Assembly.GetAssembly(type: typeof(Program))!, "wwwroot");
|
||||
var app = builder.Build();
|
||||
app.UseStaticFiles();
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
FileProvider = fileProvider,
|
||||
RequestPath = string.Empty,
|
||||
});
|
||||
|
||||
app.UseAntiforgery();
|
||||
app.MapRazorComponents<App>()
|
||||
.AddInteractiveServerRenderMode();
|
||||
|
Loading…
Reference in New Issue
Block a user