mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-08 04:05:23 -04:00
Pass forward X-Real-IP to nginx backend server (#901)
The TLS termination server sets X-Real-IP to be used by the back-end, but the back-end configuration example doesn't actually extract it so nginx logs (and back-end processing) fails to log or use the visiting IP in any way (it just states `unix:` if using a unix socket like in the example given, or the local IP if forwarded over TCP). Adding real_ip_header to the config will fix this. Signed-off-by: Moonchild <moonchild@palemoon.org>
This commit is contained in:
parent
1cb1352a44
commit
21f570962c
@ -79,6 +79,10 @@ server {
|
|||||||
root "/srv/http/anubistest.techaro.lol";
|
root "/srv/http/anubistest.techaro.lol";
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
# Get the visiting IP from the TLS termination server
|
||||||
|
set_real_ip_from unix:;
|
||||||
|
real_ip_header X-Real-IP;
|
||||||
|
|
||||||
# Your normal configuration can go here
|
# Your normal configuration can go here
|
||||||
# location .php { fastcgi...} etc.
|
# location .php { fastcgi...} etc.
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user