From 25e98f92dee376ddefd3663cd20ef8cc68d8a5f1 Mon Sep 17 00:00:00 2001 From: Luis Galeas Date: Thu, 26 Sep 2024 14:36:35 +0100 Subject: [PATCH] correct the nginx conf file --- .../server-config/nginx.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/backend-monorepo-multiservice/server-config/nginx.conf b/application/backend-monorepo-multiservice/server-config/nginx.conf index 2d63e695..4240ed16 100644 --- a/application/backend-monorepo-multiservice/server-config/nginx.conf +++ b/application/backend-monorepo-multiservice/server-config/nginx.conf @@ -13,17 +13,17 @@ http { sendfile on; keepalive_timeout 65; - - # Access and error logs are sent to stdout and stderr - access_log /dev/stdout main; - error_log /dev/stderr warn; - + # Custom log format to log both REMOTE_ADDR and X-Forwarded-For log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" - "$http_x_forwarded_for" - ' '"$http_x_real_ip" - "$http_x_google_real_ip"'; + # Access and error logs are sent to stdout and stderr + access_log /dev/stdout main; + error_log /dev/stderr warn; + # Set trusted Cloud Run proxy IP ranges set_real_ip_from 0.0.0.0/0; # All IP ranges, or specific trusted ranges can be used real_ip_header X-Forwarded-For;