Skip to content

Commit

Permalink
More locked down websocket path
Browse files Browse the repository at this point in the history
* Previously, the nginx location would match on /foo/websocket... or
  /foo/api/websocket... Now, we require these two paths to start at the
  root i.e. <host>/websocket/... /api/websocket/...
* Note: We now also require an ending / and do NOT support
  <host>/websocket_foobar but DO support <host>/websocket/foobar. This
  was always the intended behavior. We want to keep
  <host>/api/websocket/... "open" and routing to daphne in case we want
  to add more websocket urls in the future.
  • Loading branch information
chrismeyersfsu committed Feb 13, 2024
1 parent 1eb8501 commit 5f3d9ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/installer/templates/configmaps/config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ data:
alias /var/lib/awx/public/static/media/favicon.ico;
}

location ~ ({{ (ingress_path + '/websocket').replace('//', '/') }}|{{ (ingress_path + '/api/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
Expand Down

0 comments on commit 5f3d9ed

Please sign in to comment.