mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 08:18:43 -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:
@@ -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)),
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user