rproxy v1.8.4: внедрение proxy_redirect и оптимизация заголовков для UI

This commit is contained in:
Petro1990 2026-03-14 22:46:22 +03:00
parent 7415003313
commit 1bff184f2b
1 changed files with 4 additions and 3 deletions

7
rproxy
View File

@ -3,7 +3,7 @@
# Публикация локальных сервисов через SSH-туннели + nginx на VPS
# https://github.com/l-ptrol/rProxy
VERSION="1.8.3"
VERSION="1.8.4"
export PATH="/opt/bin:/opt/sbin:$PATH"
CONF_DIR="/opt/etc/rproxy"
CONF_FILE="$CONF_DIR/rproxy.conf"
@ -1236,7 +1236,7 @@ generate_nginx_conf() {
proxy_set_header Connection "upgrade";
proxy_set_header Host "$stealth_host";
proxy_set_header Origin "http://$stealth_host";
proxy_set_header Referer "http://$stealth_host/";
proxy_set_header Referer "http://$stealth_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-Proto \$scheme;
@ -1244,7 +1244,8 @@ generate_nginx_conf() {
proxy_set_header X-Forwarded-Server \$host;
proxy_cookie_domain "$t_host" "\$host";
proxy_cookie_path / "$path";
proxy_redirect off;
# Редиректы: если приложение шлет Location: /login, Nginx заменит на Location: $path/login
proxy_redirect / "$path";
}
NGINXEOF
}