Bearle / django-private-chat

(Deprecated - Please check out https://github.com/Bearle/django_private_chat2) Django one-to-one Websocket-based Asyncio-handled chat, developed by Bearle team
ISC License
424 stars 132 forks source link

SSL support #5

Closed TonyRehley closed 6 years ago

TonyRehley commented 7 years ago

Hi,

Can you give a gudie how make django-private-chat working with SSL?

delneg commented 7 years ago

Well, basically it is just like other websocket applications - you have to use WSS The package itself has 'ws://' hard-coded in django_private_chat/views.py, it will be changed for you to be able to specify protocol.

delneg commented 7 years ago

Commits https://github.com/Bearle/django-private-chat/commit/d4cdf856576460955e55e208f38c8343f6d7e14b - https://github.com/Bearle/django-private-chat/commit/d3468dff3dc7486f9add0109eedae195a4a122b5. I've added CHAT_WS_SERVER_PROTOCOL settings which you can set to 'wss' and use something like caddy for serving websocket requests.

TonyRehley commented 7 years ago

Thanks guys. All works great. WSS in frontend was needed and nignx SSL proxy between browser. Great job!