fanout / django-eventstream

Server-Sent Events for Django
MIT License
650 stars 85 forks source link

If EVENTSTREAM_ALLOW_ORIGIN is unset, fallback to using ALLOWED_HOSTS… #13

Closed svvitale closed 6 years ago

svvitale commented 6 years ago

… in the CORS header.

It took me a little while to figure out that EVENTSTREAM_ALLOW_ORIGIN was required for my setup. This change defaults the CORS header to use the ALLOWED_HOSTS value, but still prefers (and documents) the new EVENTSTREAM_ALLOW_ORIGIN setting.

svvitale commented 6 years ago

This still needs a little refinement. One more commit coming soon.