Fix IP forwarding headers. Fixes #1214 (#1215)

pull/1217/head
Dessalines 2020-10-21 05:47:45 -04:00 committed by GitHub
parent dd99e77881
commit 1b62e65a5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -53,10 +53,6 @@ server {
# frontend # frontend
location / { location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# The default ports: # The default ports:
# lemmy_ui_port: 1235 # lemmy_ui_port: 1235
# lemmy_port: 8536 # lemmy_port: 8536
@ -82,6 +78,11 @@ server {
# Rate limit # Rate limit
limit_req zone=lemmy_ratelimit burst=30 nodelay; limit_req zone=lemmy_ratelimit burst=30 nodelay;
# Add IP forwarding headers
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
} }