File tree Expand file tree Collapse file tree
ansible/roles/nginx-proxied-service/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ server {
3030 resolver 8.8.8.8 8.8.4.4 valid=300s;
3131 resolver_timeout 5s;
3232
33- rewrite ^/app\/.+ /app/;
34-
3533 gzip on;
3634 gzip_vary on;
3735 gzip_proxied any;
@@ -47,6 +45,18 @@ server {
4745 proxy_set_header x-forwarded-proto 'https';
4846 }
4947
48+ location ~ ^/app/(.*)$ {
49+ rewrite /app/(.*) /app/ break;
50+ expires 300;
51+ proxy_pass http://{{ target_ip_address }}:{{ proxy_target_ports.stdout_lines[0] | trim }};
52+ proxy_set_header Host $host;
53+ proxy_set_header x-real-ip $remote_addr;
54+ proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;
55+ proxy_set_header x-forwarded-protocol 'https';
56+ proxy_set_header x-forwarded-proto 'https';
57+ proxy_set_header x-forwarded-path '/app/$1';
58+ }
59+
5060 location /graphql {
5161 proxy_pass http://{{ target_ip_address }}:{{ proxy_target_ports.stdout_lines[1] | trim }};
5262 proxy_set_header Host $host;
You can’t perform that action at this time.
0 commit comments