diff --git a/awx/main/routing.py b/awx/main/routing.py index 9625b2317649..290e202afa7d 100644 --- a/awx/main/routing.py +++ b/awx/main/routing.py @@ -27,6 +27,7 @@ def __init__(self, *args, **kwargs): websocket_urlpatterns = [ + re_path(r'api/websocket/$', consumers.EventConsumer.as_asgi()), re_path(r'websocket/$', consumers.EventConsumer.as_asgi()), re_path(r'websocket/relay/$', consumers.RelayConsumer.as_asgi()), ] diff --git a/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 b/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 index ca82f92c5584..95c86cb9ee93 100644 --- a/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 +++ b/tools/docker-compose/ansible/roles/sources/templates/nginx.locations.conf.j2 @@ -10,7 +10,7 @@ location {{ (ingress_path + '/favicon.ico').replace('//', '/') }} { alias /awx_devel/awx/public/static/favicon.ico; } -location {{ (ingress_path + '/websocket').replace('//', '/') }} { +location ~ ({{ (ingress_path + '/websocket').replace('//', '/') }}|{{ (ingress_path + '/api/websocket').replace('//', '/') }}) { # Pass request to the upstream alias proxy_pass http://daphne; # Require http version 1.1 to allow for upgrade requests