channels: Using django channels causing login and session getting corrupted.
[2016/07/07 15:58:21] HTTP GET /accounts/login/ 200 [0.06, 127.0.0.1:60921]
Url patterns urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^new/$', views.new_room, name='new_room'),
url(r'^accounts/profile/$', views.testView, name='testView'),
url(r'^accounts/', include('allauth.urls')),
url(r'^(?P<label>[\w-]{,50})/$', views.chat_room, name='chat_room'),
]
routing.py
channel_routing = {
'http.request': StaticFilesConsumer(),
'websocket.connect': consumers.ws_connect,
'websocket.receive': consumers.ws_receive,
'websocket.disconnect': consumers.ws_disconnect,
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 30 (13 by maintainers)
That redirect problem is because you didn’t have Nginx set to send
X-Forwarded-Protocolto Django, so it didn’t know that the connection was in fact SSL. We’re getting native TLS support for Daphne soon that will make it easier to not screw this up.