修复jmidjourney流式数据没有实时推送的问题

This commit is contained in:
jingrow 2026-04-16 15:57:26 +08:00
parent 539b0a3725
commit 61d9e10ec6
2 changed files with 7 additions and 3 deletions

View File

@ -42,5 +42,9 @@ async def ve_generate_image(data: dict, request: Request):
return StreamingResponse(
generate(),
media_type="application/x-ndjson",
headers={"X-Content-Type-Options": "nosniff"}
headers={
"Cache-Control": "no-cache",
"X-Accel-Buffering": "no",
"X-Content-Type-Options": "nosniff"
}
)