fanout / django-eventstream

Server-Sent Events for Django
MIT License
638 stars 84 forks source link

SSL Issue #68

Open jkain88 opened 3 years ago

jkain88 commented 3 years ago

When ssl was implemented on our platform, it stopped receiving events.

We've used channels and daphne daphne app4gives.asgi:application to run our application

jkarneges commented 3 years ago

Weird. Are you using daphne to handle SSL? Or some proxy in front of daphne?

jkain88 commented 3 years ago

@jkarneges got this already solved thank you.

jkain88 commented 3 years ago

But we're currently facing new issue, we can't receive event messages coming from a celery worker

jkarneges commented 3 years ago

Ah, that's probably because the celery worker is a separate process. In order to send from multiple processes, you'll need to put Pushpin in front. See https://github.com/fanout/django-eventstream#multiple-instances-and-scaling.

jkain88 commented 3 years ago

Got it, thank you!

dappstop commented 2 years ago

I'm actually having this issue on my application backend; locally the SSE events work fine, but when I deploy it with a NGINX proxy server (that handles SSL for me), the client won't connect to the /events/ route anymore (it gives a 404 error). @jkain88 how did you solve this issue? Are you handling SSL via Daphne?