diff --git a/rproxy b/rproxy index 980dedf..a0f4c72 100644 --- a/rproxy +++ b/rproxy @@ -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 }