From d7437cc4a7403c3fc0eb5c5ad53b4f377a702a65 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Fri, 6 Nov 2020 13:17:30 +1000 Subject: [PATCH 1/2] Test for real-ip header --- docker/rootfs/etc/nginx/conf.d/include/proxy.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/rootfs/etc/nginx/conf.d/include/proxy.conf b/docker/rootfs/etc/nginx/conf.d/include/proxy.conf index b84a451..bb0141f 100644 --- a/docker/rootfs/etc/nginx/conf.d/include/proxy.conf +++ b/docker/rootfs/etc/nginx/conf.d/include/proxy.conf @@ -3,4 +3,6 @@ proxy_set_header Host $host; proxy_set_header X-Forwarded-Scheme $scheme; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $remote_addr; +proxy_set_header X-Real-IP $http_x_real_ip; proxy_pass $forward_scheme://$server:$port; + From 13eaa346bcbbb7e8bf41b8b6965e2644d5436363 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Fri, 6 Nov 2020 13:21:22 +1000 Subject: [PATCH 2/2] Use remote addr as real ip --- docker/rootfs/etc/nginx/conf.d/include/proxy.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/rootfs/etc/nginx/conf.d/include/proxy.conf b/docker/rootfs/etc/nginx/conf.d/include/proxy.conf index bb0141f..c0dce06 100644 --- a/docker/rootfs/etc/nginx/conf.d/include/proxy.conf +++ b/docker/rootfs/etc/nginx/conf.d/include/proxy.conf @@ -3,6 +3,6 @@ proxy_set_header Host $host; proxy_set_header X-Forwarded-Scheme $scheme; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $remote_addr; -proxy_set_header X-Real-IP $http_x_real_ip; +proxy_set_header X-Real-IP $remote_addr; proxy_pass $forward_scheme://$server:$port;