fix: 일일보고서 CORS 에러 및 datetime 호환성 문제 수정

- 전역 예외 처리기에 CORS 헤더 추가 (500 에러에서도 CORS 헤더 포함)
- datetime.date 객체의 timestamp/tzinfo 호환성 문제 해결
- 일일보고서 접근 권한을 모든 로그인 사용자로 확대

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-06 13:51:28 +09:00
parent c4af58d849
commit ef5c5e63cb
2 changed files with 32 additions and 15 deletions

View File

@@ -60,9 +60,15 @@ async def health_check():
# 전역 예외 처리
@app.exception_handler(Exception)
async def global_exception_handler(request: Request, exc: Exception):
# CORS 헤더 추가 (500 에러에서도 CORS 헤더가 필요)
return JSONResponse(
status_code=500,
content={"detail": f"Internal server error: {str(exc)}"}
content={"detail": f"Internal server error: {str(exc)}"},
headers={
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
"Access-Control-Allow-Headers": "*"
}
)
if __name__ == "__main__":