fix: Blazor WASM 클라이언트 localhost:5265 하드코딩 전면 제거
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 12s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 8s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Deploy to Production / Build & Deploy to Production (push) Successful in 2m40s

증상: 프로덕션에서 'Connection refused (localhost:5265)' 오류
원인: WASM 클라이언트 3개 파일에 localhost:5265 null-fallback이 박혀 있어
      브라우저가 사용자 로컬 포트로 API 요청을 시도함.

수정 파일:
- ApiClient.cs: null fallback 제거 → 잘못된 DI 구성 시 명시적 예외 발생
- Users.razor: LoadUsers()의 BaseAddress 강제 설정 제거
- CustomAuthenticationStateProvider.cs: baseUrl fallback 제거, 상대 경로 사용

올바른 동작: Client/Program.cs에서 builder.HostEnvironment.BaseAddress로
             DI 등록 → 항상 현재 도메인 기준 상대 경로로 API 호출.
This commit is contained in:
2026-07-06 17:48:34 +09:00
parent d5ede69800
commit 4e23a87085
3 changed files with 11 additions and 8 deletions
@@ -136,10 +136,8 @@
{
try
{
if (Http.BaseAddress == null)
{
Http.BaseAddress = new Uri("http://localhost:5265/");
}
// BaseAddress is set to HostEnvironment.BaseAddress by DI in Client/Program.cs.
// Never override it with a hardcoded port.
var res = await Http.GetFromJsonAsync<List<UserDto>>("api/users");
if (res != null)
{