개선: 배포 검증과 관리자 UX 안정화
TaxBaik Browser E2E / browser-e2e (push) Failing after 1m3s
TaxBaik CI/CD / build-and-deploy (push) Failing after 2m46s

This commit is contained in:
2026-06-27 20:57:09 +09:00
parent 64b08831e8
commit f29f2c3cff
51 changed files with 948 additions and 199 deletions
+54
View File
@@ -142,6 +142,60 @@ if (!app.Environment.IsDevelopment())
app.MapControllers();
app.MapHealthChecks("/healthz");
app.MapRazorPages();
app.MapGet("/blog/{slug}", async (string slug, TaxBaik.Application.Services.BlogService blogService, HttpContext context) =>
{
var post = await blogService.GetBySlugAsync(slug, context.RequestAborted);
if (post == null)
return Results.NotFound();
var baseUrl = $"{context.Request.Scheme}://{context.Request.Host}{context.Request.PathBase}";
var canonical = $"{baseUrl}/blog/{post.Slug}";
var html = $"""
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{System.Net.WebUtility.HtmlEncode(post.SeoTitle ?? post.Title)}</title>
<meta name="description" content="{System.Net.WebUtility.HtmlEncode(post.SeoDescription ?? string.Empty)}" />
<link rel="canonical" href="{canonical}" />
</head>
<body>
<main>
<h1>{System.Net.WebUtility.HtmlEncode(post.Title)}</h1>
</main>
</body>
</html>
""";
return Results.Content(html, "text/html; charset=utf-8");
});
app.MapGet("/taxbaik/blog/{slug}", async (string slug, TaxBaik.Application.Services.BlogService blogService, HttpContext context) =>
{
var post = await blogService.GetBySlugAsync(slug, context.RequestAborted);
if (post == null)
return Results.NotFound();
var baseUrl = $"{context.Request.Scheme}://{context.Request.Host}{context.Request.PathBase}";
var canonical = $"{baseUrl}/blog/{post.Slug}";
var html = $"""
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{System.Net.WebUtility.HtmlEncode(post.SeoTitle ?? post.Title)}</title>
<meta name="description" content="{System.Net.WebUtility.HtmlEncode(post.SeoDescription ?? string.Empty)}" />
<link rel="canonical" href="{canonical}" />
</head>
<body>
<main>
<h1>{System.Net.WebUtility.HtmlEncode(post.Title)}</h1>
</main>
</body>
</html>
""";
return Results.Content(html, "text/html; charset=utf-8");
});
app.MapRazorComponents<TaxBaik.Web.Components.Admin.App>().AddInteractiveServerRenderMode();
app.Run();