diff --git a/src/TaxBaik.Web/Program.cs b/src/TaxBaik.Web/Program.cs index ac0c877..b710050 100644 --- a/src/TaxBaik.Web/Program.cs +++ b/src/TaxBaik.Web/Program.cs @@ -370,8 +370,8 @@ app.UseResponseCompression(); // 정적 파일 제공 (WASM 프레임워크 파일 포함) app.UseStaticFiles(); -app.UseStaticFiles(new StaticFileOptions { RequestPath = "/admin" }); -app.UseStaticFiles(new StaticFileOptions { RequestPath = "/portal" }); +app.UseStaticFiles("/admin"); +app.UseStaticFiles("/portal"); app.UseSession(); // TempData 쿠키 저장소 app.UseRouting(); @@ -394,13 +394,12 @@ app.MapHealthChecks("/healthz"); app.MapRazorPages(); // Sitemap.cshtml, Rss.cshtml, Feed.cshtml app.MapStaticAssets(); -// Blazor WebAssembly Admin Client (WASM 파일 제공 필수) -app.MapRazorComponents() - .AddInteractiveWebAssemblyRenderMode() - .AllowAnonymous(); +// 루트 경로 기본값 +app.MapGet("/", () => Results.Redirect("/taxbaik/")); // SPA 라우팅 폴백 (가장 마지막에!) app.MapFallbackToFile("admin/{*path:nonfile}", "admin/index.html"); +app.MapFallbackToFile("portal/{*path:nonfile}", "portal/index.html"); // 애플리케이션 시작/종료 로깅 try diff --git a/src/TaxBaik.Web/wwwroot/admin/index.html b/src/TaxBaik.Web/wwwroot/admin/index.html index cd86638..92912e7 100644 --- a/src/TaxBaik.Web/wwwroot/admin/index.html +++ b/src/TaxBaik.Web/wwwroot/admin/index.html @@ -18,6 +18,6 @@ 🗙 - +