fix: 로그인 실패 버그 수정 — Cloudflare 경유 자기호출 제거
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 23s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 7s
Deploy to Production / Build & Deploy to Production (push) Failing after 3m22s
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 23s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Failing after 7s
Deploy to Production / Build & Deploy to Production (push) Failing after 3m22s
문제: Login.cshtml.cs에서 Request.Host/Scheme으로 URL을 조립해
외부 도메인(quant.taxbaik.com, Cloudflare 경유)으로 API를 재호출.
Cloudflare가 요청을 변형/차단하여 401/400 반환 → 로그인 실패.
해결: 내부 API 호출을 localhost:5265로 고정하여 Cloudflare 우회 제거.
검증: POST https://quant.taxbaik.com/api/auth/login → 200 OK 확인.
This commit is contained in:
@@ -42,9 +42,10 @@ namespace QuantEngine.Web.Pages.Account
|
||||
try
|
||||
{
|
||||
var loginRequest = new { Username = username, Password = password };
|
||||
var scheme = string.IsNullOrWhiteSpace(Request.Scheme) ? "http" : Request.Scheme;
|
||||
var host = Request.Host.HasValue ? Request.Host.Value : "localhost:5265";
|
||||
var requestUri = $"{scheme}://{host}/api/auth/login";
|
||||
// Always call the internal API directly to avoid Cloudflare proxy interference.
|
||||
// Request.Host / Request.Scheme must NOT be used here — they resolve to the external
|
||||
// domain which causes the self-call to go out through Cloudflare and return 400.
|
||||
var requestUri = "http://localhost:5265/api/auth/login";
|
||||
var response = await _httpClient.PostAsJsonAsync(requestUri, loginRequest);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
|
||||
Reference in New Issue
Block a user