Closed maycuatroi closed 8 months ago
WEBSOCKET: 'true'
WORKER_PROCESSES: '10'
-> Not work
Resolved.
We need to update python code in django app
response = StreamingHttpResponse(
streaming_content=stream, content_type="text/event-stream"
)
response["Cache-Control"] = "no-cache" # prevent client cache
response["X-Accel-Buffering"] = "no" # Allow Stream over NGINX server
return response
I'm currently facing an issue with using HTTPS with the following configuration:
When sending requests through the server, the Stream Response seems to not work:
However, when I test with the same server, bypassing HTTPS and directly opening the container's
django
port to send an HTTP request to port 8080, the stream response works fine.I have limited experience handling Stream Responses with NGINX and would appreciate any guidance.