From: Felix Ableitner Date: Tue, 15 Dec 2020 14:01:37 +0000 (+0100) Subject: Add IP forwarding headers to nginx config (fixes #1318) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/static/sneer-club-logo.svg?a=commitdiff_plain;h=998e824bd84680fab4f815d8116fada9952ab0e4;p=lemmy.git Add IP forwarding headers to nginx config (fixes #1318) --- diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index 0874be8f..91fcd931 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -67,6 +67,11 @@ server { proxy_pass $proxpass; rewrite ^(.+)/+$ $1 permanent; + + # Send actual client IP upstream + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # backend