fix: 일일보고서 권한 체크를 페이지 권한 기반으로 변경 및 Edge 호환성 개선

- reports.py: role==admin 하드코딩 → check_page_access로 변경하여
  reports/reports_daily 페이지 권한 보유자도 미리보기/엑셀 내보내기 가능
- page_permissions.py: 동기 헬퍼 함수 check_page_access() 추가
  (기존 async API 엔드포인트를 await 없이 호출하는 버그 해결)
- reports-daily.html: 에러 핸들링 강화 (401/403 구분), blob download
  revokeObjectURL 지연 처리 (Edge 호환)
- nginx.conf: proxy_read_timeout/proxy_buffering off 추가
- reports.py: JSONResponse+jsonable_encoder로 명시적 직렬화,
  Content-Disposition에 ASCII 폴백 파일명 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-04 13:50:35 +09:00
parent 39b2139ea1
commit 87af06ca9c
4 changed files with 142 additions and 34 deletions

View File

@@ -41,6 +41,11 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
# 엑셀 생성 등 시간이 걸리는 API 대응
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_buffering off;
}
# 업로드 파일