From aa60cd91b2ba1d00446144f47214f96fe46466f1 Mon Sep 17 00:00:00 2001 From: JonRB <4564448+eeyrjmr@users.noreply.github.com> Date: Sat, 26 Feb 2022 18:32:09 +0000 Subject: [PATCH] Update nginx reverse proxy docs (#18922) Add additional config lines for the set_header to forward additional information (eg the IP) Co-authored-by: Lunny Xiao --- docs/content/doc/usage/reverse-proxies.en-us.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/content/doc/usage/reverse-proxies.en-us.md b/docs/content/doc/usage/reverse-proxies.en-us.md index 4567b09d22..90b2765daa 100644 --- a/docs/content/doc/usage/reverse-proxies.en-us.md +++ b/docs/content/doc/usage/reverse-proxies.en-us.md @@ -30,6 +30,10 @@ server { location / { proxy_pass http://localhost:3000; + 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; } } ``` @@ -47,6 +51,10 @@ server { location /git/ { # Note: Trailing slash proxy_pass http://localhost:3000/; + 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; } } ```