Enhance Nginx configuration for IP handling

Added a new location block for '/entry' to improve IP handling and set various proxy headers.
This commit is contained in:
Alexandre
2026-01-08 16:56:14 +01:00
committed by GitHub
parent 42d82581f1
commit 1fac8c2f4a

View File

@@ -6,6 +6,21 @@ server {
client_max_body_size 0;
location /entry {
# Improve ip handling
proxy_hide_header X-Powered-By;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Accept-Encoding "";
proxy_read_timeout 90;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
absolute_redirect off;
add_header Access-Control-Allow-Origin *;
return 302 %%INGRESS_URL%%/?ui_credentials=%7B%22host%22%3A%22$http_host%%INGRESS_URL%%/%22%2C%22port%22%3A%22%%PORT%%%22%2C%22pathPrefix%22%3A%22%%UIPATH%%%22%2C%22secretToken%22%3A%22%%TOKEN%%%22%7D;
}
location / {
add_header Access-Control-Allow-Origin *;
proxy_connect_timeout 30m;