Skip to content

Commit

Permalink
fix nginx append slash to respect proxy
Browse files Browse the repository at this point in the history
This is already fixed in awx-operator.
See https://github.com/ansible/awx-operator/blob/a534c856dbebc853191fb2547346007a60f137db/roles/installer/templates/configmaps/config.yaml.j2#L215
This just makes it so a development environment can also work correctly
behind a proxy

Fixes problem of
GET to https://$PROXY/something/awx/v2/me
rewritten to https://$AWX/something/awx/v2/me/ (which doesn't exist)

instead path is correctly rewritten as https://$PROXY/something/awx/v2/me/
  • Loading branch information
kdelee authored and chrismeyersfsu committed Jan 29, 2024
1 parent 266e31d commit 9aa3d55
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ location {{ (ingress_path + '/websocket').replace('//', '/') }} {

location {{ ingress_path }} {
# Add trailing / if missing
rewrite ^(.*[^/])$ $1/ permanent;
rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent;
uwsgi_read_timeout 120s;
uwsgi_pass uwsgi;
include /etc/nginx/uwsgi_params;
Expand Down

0 comments on commit 9aa3d55

Please sign in to comment.