diff --git a/nginx.conf b/nginx.conf index 7cd2bbd12..1da8d45da 100644 --- a/nginx.conf +++ b/nginx.conf @@ -125,20 +125,19 @@ http { } location ~ ^/status/ { - resolver 127.0.0.11 valid=15s; - - proxy_set_header Host $host; - proxy_pass http://172.17.0.1:17000$is_args$args; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; - rewrite ^/status(.*)$ $1 break; + # Forward /status directly down the tunnel + proxy_pass http://172.17.0.1:17000; proxy_cache status_cache; proxy_cache_key "$uri$is_args$args"; proxy_cache_valid 200 302 30s; proxy_cache_valid 404 1m; proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; - # REMOVE proxy_cache_bypass unless you intend to bypass on a specific condition - # proxy_cache_bypass $http_pragma; proxy_cache_revalidate on; add_header X-Cache-Status $upstream_cache_status;