projects
/
lemmy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb9a06e
)
Add IP forwarding headers to nginx config (fixes #1318)
author
Felix Ableitner
<me@nutomic.com>
Tue, 15 Dec 2020 14:01:37 +0000
(15:01 +0100)
committer
Felix Ableitner
<me@nutomic.com>
Tue, 15 Dec 2020 14:01:37 +0000
(15:01 +0100)
ansible/templates/nginx.conf
patch
|
blob
|
history
diff --git
a/ansible/templates/nginx.conf
b/ansible/templates/nginx.conf
index 0874be8f9c853fecd5b9223d6a4c11439a0f0c50..91fcd9318cd49f491621aff73b72e20d69b4247d 100644
(file)
--- 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