Fix remote IP, fix title

This commit is contained in:
blankhex committed 2026-10-21 20:28:50 +03:00
1 parent 284e4e7080
commit b5630d2af7
6 files changed
+39 -14

No files matched your search

+6 -1
View File
@@ -26,12 +26,17 @@ server {
# Reverse proxy the API to the Go service. Keeping the same origin means
# the session cookie (SameSite=Lax) and CSRF cookie work without CORS.
#
# X-Forwarded-For uses $remote_addr (the immediate peer) so a client cannot
# spoof its recorded session IP; the backend trusts the leftmost value. If
# this nginx sits behind another trusted proxy, use $proxy_add_x_forwarded_for
# and make the backend read the appropriate hop instead.
location /api/ {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}