]> Untitled Git - lemmy.git/commitdiff
Add IP forwarding headers to nginx config (fixes #1318)
authorFelix Ableitner <me@nutomic.com>
Tue, 15 Dec 2020 14:01:37 +0000 (15:01 +0100)
committerFelix Ableitner <me@nutomic.com>
Tue, 15 Dec 2020 14:01:37 +0000 (15:01 +0100)
ansible/templates/nginx.conf

index 0874be8f9c853fecd5b9223d6a4c11439a0f0c50..91fcd9318cd49f491621aff73b72e20d69b4247d 100644 (file)
@@ -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