diff --git a/scripts/route_lint.mjs b/scripts/route_lint.mjs index 2799ffe..6dbffd0 100644 --- a/scripts/route_lint.mjs +++ b/scripts/route_lint.mjs @@ -15,8 +15,8 @@ const files = [ const required = [ { file: 'src/TaxBaik.Web/Program.cs', - pattern: 'app.MapFallbackToFile("admin/{*path:nonfile}", "admin/index.html");', - message: '관리자 SPA 폴백은 admin/index.html로만 연결되어야 합니다.' + pattern: 'app.MapRazorPages();', + message: '관리자 화면은 Razor Pages 라우팅을 사용해야 합니다.' }, { file: 'tests/e2e/route-isolation.spec.ts', diff --git a/src/TaxBaik.Web/Program.cs b/src/TaxBaik.Web/Program.cs index 2fe914b..1a486d2 100644 --- a/src/TaxBaik.Web/Program.cs +++ b/src/TaxBaik.Web/Program.cs @@ -11,7 +11,6 @@ using Microsoft.AspNetCore.ResponseCompression; using MudBlazor.Services; using Serilog; using FluentValidation; -using FastEndpoints; using System.Threading.RateLimiting; using TaxBaik.Application; using TaxBaik.Application.Services; @@ -240,7 +239,6 @@ builder.Services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All)); builder.Services.AddInfrastructure(); builder.Services.AddApplication(); builder.Services.AddValidatorsFromAssemblyContaining(); -builder.Services.AddValidatorsFromAssemblyContaining(); builder.Services.AddScoped(); builder.Services.AddScoped(); @@ -360,17 +358,11 @@ app.UseAuthentication(); app.UseAuthorization(); app.UseAntiforgery(); -// API + Razor Pages + 정적 자산 매핑 -app.MapControllers(); -app.MapFastEndpoints(); +// Razor Pages + 정적 자산 매핑 app.MapHealthChecks("/healthz"); app.MapRazorPages(); // Sitemap.cshtml, Rss.cshtml, Feed.cshtml app.MapStaticAssets(); -// SPA 라우팅 폴백 -app.MapFallbackToFile("admin/{*path:nonfile}", "admin/index.html"); -app.MapFallbackToFile("portal/{*path:nonfile}", "portal/index.html"); - // 애플리케이션 시작/종료 로깅 try { diff --git a/src/TaxBaik.Web/TaxBaik.Web.csproj b/src/TaxBaik.Web/TaxBaik.Web.csproj index 9aa7dec..8347988 100644 --- a/src/TaxBaik.Web/TaxBaik.Web.csproj +++ b/src/TaxBaik.Web/TaxBaik.Web.csproj @@ -22,14 +22,10 @@ - - - - @@ -37,4 +33,8 @@ + + + +