[Bug] 루트 경로 접근 시 X-Service-Code 에러 발생 #255

Closed
opened 2026-02-26 06:03:26 +00:00 by seonkyu.kim · 0 comments
Owner

증상

브라우저에서 루트(/)로 접근 시 {"result":false,"code":"101","msg":"X-Service-Code 헤더가 필요합니다."} 에러 반환.
프론트엔드 index.html이 정상 서빙되어야 함.

원인

ServiceCodeMiddleware의 SKIP 조건에 루트 경로 및 비-API 경로가 포함되지 않음.
MapFallbackToFile("index.html")로 라우팅되는 요청이 미들웨어에서 차단됨.

수정

  • /v1로 시작하지 않는 경로는 모두 미들웨어 SKIP 처리
## 증상 브라우저에서 루트(`/`)로 접근 시 `{"result":false,"code":"101","msg":"X-Service-Code 헤더가 필요합니다."}` 에러 반환. 프론트엔드 index.html이 정상 서빙되어야 함. ## 원인 `ServiceCodeMiddleware`의 SKIP 조건에 루트 경로 및 비-API 경로가 포함되지 않음. `MapFallbackToFile("index.html")`로 라우팅되는 요청이 미들웨어에서 차단됨. ## 수정 - `/v1`로 시작하지 않는 경로는 모두 미들웨어 SKIP 처리
seonkyu.kim added the
Priority
High
Status
In Progress
Type
Bug
labels 2026-02-26 06:03:32 +00:00
seonkyu.kim self-assigned this 2026-02-26 06:03:34 +00:00
seonkyu.kim added this to the Phase 3: 운영 기능 milestone 2026-02-26 06:03:38 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-02-26 06:09:22 +00:00
Sign in to join this conversation.
No description provided.