fix: ensure MapRazorPages routes Sitemap before SPA fallback
TaxBaik CI/CD / build-and-deploy (push) Failing after 1m48s

Order is critical:
1. UseBlazorFrameworkFiles (middleware)
2. MapControllers/MapFastEndpoints (specific routes)
3. MapRazorPages (Sitemap.cshtml matches here)
4. MapFallbackToFile (catch-all last)

This prevents /taxbaik/sitemap.xml from being caught by admin fallback.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-07-04 04:45:24 +09:00
parent af8b21fdb8
commit 8591d93b88
+2 -2
View File
@@ -388,10 +388,10 @@ app.UseStaticFiles("/portal");
app.MapControllers();
app.MapFastEndpoints();
app.MapHealthChecks("/healthz");
app.MapRazorPages();
app.MapRazorPages(); // Sitemap.cshtml이 여기서 먼저 매치됨!
app.MapStaticAssets();
// SPA 라우팅 폴백 (각 경로에서 index.html 제공)
// SPA 라우팅 폴백 (각 경로에서 index.html 제공) - 가장 마지막에!
app.MapFallbackToFile("admin/{*path:nonfile}", "admin/index.html");
app.MapFallbackToFile("portal/{*path:nonfile}", "portal/index.html");