mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Websockets now use rest_framework configed auth
* Always support cookies, session, and also allow rest_framework configured auth methods over the browser websocket. * The node -> node websocket auth remains locked down and unchanged
This commit is contained in:
parent
f429ef6ca7
commit
2259047527
@ -4,9 +4,10 @@ import logging
|
||||
from django.conf import settings
|
||||
from django.urls import re_path
|
||||
|
||||
from channels.auth import AuthMiddlewareStack
|
||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||
|
||||
from ansible_base.lib.channels.middleware import DrfAuthMiddlewareStack
|
||||
|
||||
from . import consumers
|
||||
|
||||
|
||||
@ -34,6 +35,6 @@ websocket_urlpatterns = [
|
||||
|
||||
application = AWXProtocolTypeRouter(
|
||||
{
|
||||
'websocket': AuthMiddlewareStack(URLRouter(websocket_urlpatterns)),
|
||||
'websocket': DrfAuthMiddlewareStack(URLRouter(websocket_urlpatterns)),
|
||||
}
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user