From e8454e292278f6a6c9889b2c4ef5c28215aa78d2 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Wed, 26 Feb 2025 00:07:47 +0100 Subject: [PATCH] Use real IP from forwarded IP Signed-off-by: Emmy D'Anello --- nginx-php.conf | 4 ++++ nginx.conf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/nginx-php.conf b/nginx-php.conf index 8639143..b7d5b69 100644 --- a/nginx-php.conf +++ b/nginx-php.conf @@ -9,6 +9,10 @@ server { index index.html index.htm index.php; error_page 404 /404.html; + real_ip_header X-Forwarded-For; + real_ip_recursive on; + set_real_ip_from 0.0.0.0/0; + location /trigger-ci.json { proxy_pass http://trigger-ci; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/nginx.conf b/nginx.conf index 02c534a..05c6bd9 100644 --- a/nginx.conf +++ b/nginx.conf @@ -8,6 +8,10 @@ server { root /var/www/html; error_page 404 /404.html; + real_ip_header X-Forwarded-For; + real_ip_recursive on; + set_real_ip_from 0.0.0.0/0; + location /trigger-ci.json { proxy_pass http://trigger-ci; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;