From e009b52c7b918c7d27d5ca9317dd2ba3d61e797b Mon Sep 17 00:00:00 2001 From: thehrz Date: Sun, 18 Aug 2024 21:18:47 +0800 Subject: [PATCH] pref: update nginx config --- nginx/conf.d/4.conf | 9 ++++++--- nginx/conf.d/6.conf | 9 ++++++--- nginx/conf.d/root.conf | 9 ++++++--- nginx/conf.d/test.conf | 6 ++++++ 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/nginx/conf.d/4.conf b/nginx/conf.d/4.conf index 66bdfca..16c98c2 100644 --- a/nginx/conf.d/4.conf +++ b/nginx/conf.d/4.conf @@ -13,8 +13,11 @@ server { location / { proxy_pass http://ipv6-test-backend:8080/; - proxy_read_timeout 60; - proxy_connect_timeout 60; - proxy_redirect off; + proxy_set_header Connection $http_connection; + proxy_set_header Upgrade $http_upgrade; + 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; } } \ No newline at end of file diff --git a/nginx/conf.d/6.conf b/nginx/conf.d/6.conf index abf59aa..5e6214e 100644 --- a/nginx/conf.d/6.conf +++ b/nginx/conf.d/6.conf @@ -13,8 +13,11 @@ server { location / { proxy_pass http://ipv6-test-backend:8080/; - proxy_read_timeout 60; - proxy_connect_timeout 60; - proxy_redirect off; + proxy_set_header Connection $http_connection; + proxy_set_header Upgrade $http_upgrade; + 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; } } \ No newline at end of file diff --git a/nginx/conf.d/root.conf b/nginx/conf.d/root.conf index 695904b..c8f40d1 100644 --- a/nginx/conf.d/root.conf +++ b/nginx/conf.d/root.conf @@ -14,8 +14,11 @@ server { location / { proxy_pass http://ipv6-test-frontend:3000; - proxy_read_timeout 60; - proxy_connect_timeout 60; - proxy_redirect off; + proxy_set_header Connection $http_connection; + proxy_set_header Upgrade $http_upgrade; + 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; } } \ No newline at end of file diff --git a/nginx/conf.d/test.conf b/nginx/conf.d/test.conf index cfa472f..cf0b3e5 100644 --- a/nginx/conf.d/test.conf +++ b/nginx/conf.d/test.conf @@ -14,5 +14,11 @@ server { location / { proxy_pass http://ipv6-test-backend:8080/; + proxy_set_header Connection $http_connection; + proxy_set_header Upgrade $http_upgrade; + 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; } } \ No newline at end of file