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

This commit is contained in:
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

View File

@ -53,10 +53,6 @@ server {
# frontend
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:
# lemmy_ui_port: 1235
# lemmy_port: 8536
@ -82,6 +78,11 @@ server {
# Rate limit
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;
}