Skip to content

Commit

Permalink
Update nginx reverse proxy docs (go-gitea#18922)
Browse files Browse the repository at this point in the history
Add additional config lines for the set_header to forward additional information (eg the IP)

Co-authored-by: Lunny Xiao <[email protected]>
  • Loading branch information
2 people authored and Stelios Malathouras committed Mar 28, 2022
1 parent 7cfc308 commit e60fbb4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/content/doc/usage/reverse-proxies.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
```
Expand All @@ -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;
}
}
```
Expand Down

0 comments on commit e60fbb4

Please sign in to comment.