diff options
author | JonRB <4564448+eeyrjmr@users.noreply.github.com> | 2022-02-26 18:32:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-26 19:32:09 +0100 |
commit | aa60cd91b2ba1d00446144f47214f96fe46466f1 (patch) | |
tree | 964677fa14974c167c9e4bf2ffec7bb017333958 /docs/content/doc/usage | |
parent | bf2867dec2390e95c0735abaa4d7142fe1eb8d75 (diff) | |
download | gitea-aa60cd91b2ba1d00446144f47214f96fe46466f1.tar.gz gitea-aa60cd91b2ba1d00446144f47214f96fe46466f1.zip |
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 <xiaolunwen@gmail.com>
Diffstat (limited to 'docs/content/doc/usage')
-rw-r--r-- | docs/content/doc/usage/reverse-proxies.en-us.md | 8 |
1 files changed, 8 insertions, 0 deletions
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; } } ``` |