구현: 관리자 백오피스 Blazor Server + MudBlazor 컴포넌트
- 대시보드: KPI 카드 (이번달 문의, 신규 문의, 포스트 수) - 블로그 관리: 목록/작성/수정 페이지 - 문의 관리: 목록 및 상태 변경 - 설정: 사이트 연락처 정보 - 인증: Cookie 기반 8시간 세션 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,11 +9,12 @@ builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationSc
|
||||
.AddCookie(opts => {
|
||||
opts.LoginPath = "/login";
|
||||
opts.ExpireTimeSpan = TimeSpan.FromHours(8);
|
||||
opts.Cookie.SameSite = SameSiteMode.Lax;
|
||||
});
|
||||
builder.Services.AddAuthorizationCore();
|
||||
|
||||
builder.Services.AddRazorPages();
|
||||
builder.Services.AddServerSideBlazor();
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents();
|
||||
builder.Services.AddMudServices();
|
||||
builder.Services.AddMemoryCache();
|
||||
builder.Services.AddInfrastructure();
|
||||
@@ -23,7 +24,7 @@ var app = builder.Build();
|
||||
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseExceptionHandler("/Error");
|
||||
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
@@ -34,7 +35,7 @@ app.UseRouting();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapBlazorHub();
|
||||
app.MapFallbackToPage("/_Host");
|
||||
app.MapRazorComponents<TaxBaik.Admin.Components.App>()
|
||||
.AddInteractiveServerRenderMode();
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user