민감 응답 no-store 강화 + 배포 E2E stale 기대값 갱신
Some checks failed
API contract / OpenAPI type drift (push) Failing after 1m4s
Some checks failed
API contract / OpenAPI type drift (push) Failing after 1m4s
/personas·/admin 응답에 Cache-Control: no-store를 강제한다. E2E에서 미인증 /personas 요청이 일시적으로 인증 응답 본문을 받은 재현 이력이 있어 중간 캐시 재사용을 원천 차단한다. public-admin-visual 카탈로그 테스트는 운영 데이터에 따라 바뀌는 원장 모델명(claude-opus-4-8 → gpt-5.6-terra)과 엔진 옵션 수(6→9), 모델 수 문구를 고정값으로 기대했어 데이터 종속 실패였다. 계량 행·개수 정규식으로 갱신한다.
This commit is contained in:
parent
45b84faa0d
commit
d80c710f3a
3 changed files with 93 additions and 8 deletions
|
|
@ -254,6 +254,21 @@ app.add_middleware(
|
|||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
|
||||
@app.middleware("http")
|
||||
async def no_store_sensitive_responses(request, call_next):
|
||||
"""민감 데이터 응답을 HTTP 캐시에서 제외한다.
|
||||
|
||||
/personas·/admin 응답은 세션 쿠키가 붙은 요청에만 개인·임상 데이터를 담는다.
|
||||
어떤 중간 캐시가 이 응답을 재사용하면 미인증 요청에 데이터가 새어나가므로
|
||||
(2026-09-11 E2E에서 일시 재현) no-store로 강제한다.
|
||||
"""
|
||||
response = await call_next(request)
|
||||
path = request.url.path
|
||||
if path.startswith("/personas") or path.startswith("/admin"):
|
||||
response.headers["Cache-Control"] = "no-store"
|
||||
return response
|
||||
|
||||
# TODO: Presidio PII 마스킹 미들웨어 (외부 LLM 경로 진입 전 하드 게이트, R7/F-03)
|
||||
|
||||
app.mount(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue