1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

Use $http_host in trailing slash redirect

This allows the port from the request header to be used
rather than having the request redirected to the port
being used inside the container which may not be
accessible

Fixes #420
related #420

Signed-off-by: Nick Carboni <ncarboni@redhat.com>
This commit is contained in:
Nick Carboni 2017-10-12 17:30:57 -04:00
parent bcd2a8f211
commit cfa21af432

View File

@ -76,7 +76,7 @@ http {
location / {
# 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;