fix: resolve WebAssembly assembly loading and JWT authorization policy errors
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m52s
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m52s
- Remove duplicate AddAdditionalAssemblies() call that caused 'Assembly already defined' error - All Blazor components are already in the main TaxBaik.Web assembly - Add FastEndpoints JWT authorization policy to fix 'Bearer policy not found' error - Ensure proper authentication middleware configuration Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,16 @@ builder.Services.AddFastEndpoints(config =>
|
||||
{
|
||||
config.Assemblies = new[] { typeof(Program).Assembly };
|
||||
});
|
||||
// FastEndpoints Authorization Policy
|
||||
builder.Services.AddAuthorization(opts =>
|
||||
{
|
||||
opts.DefaultPolicy = new Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder(JwtBearerDefaults.AuthenticationScheme)
|
||||
.RequireAuthenticatedUser()
|
||||
.Build();
|
||||
opts.AddPolicy("Bearer", new Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder(JwtBearerDefaults.AuthenticationScheme)
|
||||
.RequireAuthenticatedUser()
|
||||
.Build());
|
||||
});
|
||||
builder.Services.AddProblemDetails();
|
||||
builder.Services.AddHealthChecks();
|
||||
builder.Services.AddRateLimiter(options =>
|
||||
@@ -417,7 +427,6 @@ app.MapStaticAssets();
|
||||
// API는 웹 서버에서만 제공 (클라이언트 프로젝트 분리 불필요)
|
||||
app.MapRazorComponents<TaxBaik.Web.Components.Admin.App>()
|
||||
.AddInteractiveWebAssemblyRenderMode()
|
||||
.AddAdditionalAssemblies(typeof(TaxBaik.Web.Components.Admin._Imports).Assembly)
|
||||
.AllowAnonymous();
|
||||
|
||||
// 애플리케이션 시작/종료 로깅
|
||||
|
||||
Reference in New Issue
Block a user