mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Allow connecting to websockets via api/websocket/
* Before, we just allowed websockets on <host>/websocket/. With this change, they can now come from <host>/api/websocket/
This commit is contained in:
parent
4b637c1319
commit
f429ef6ca7
@ -27,6 +27,7 @@ class AWXProtocolTypeRouter(ProtocolTypeRouter):
|
||||
|
||||
|
||||
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()),
|
||||
]
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user