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