mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 07:56:24 +00:00
fix cors error
This commit is contained in:
parent
9580de9c82
commit
4a8a151bb2
@ -65,7 +65,15 @@ async def stream_terms(session_id: str):
|
|||||||
sse_manager.unregister(session_id)
|
sse_manager.unregister(session_id)
|
||||||
logger.info(f"용어 스트림 종료: {session_id}")
|
logger.info(f"용어 스트림 종료: {session_id}")
|
||||||
|
|
||||||
return EventSourceResponse(event_generator())
|
return EventSourceResponse(
|
||||||
|
event_generator(),
|
||||||
|
headers={
|
||||||
|
"Cache-Control": "no-cache",
|
||||||
|
"X-Accel-Buffering": "no",
|
||||||
|
"Access-Control-Allow-Origin": "http://localhost:8000",
|
||||||
|
"Access-Control-Allow-Credentials": "true",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise HTTPException(status_code=429, detail=str(e))
|
raise HTTPException(status_code=429, detail=str(e))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user