mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-26 18:43:39 +02:00
Fix webtop ingress: replace CWS port placeholder with 8082 and SUBFOLDER with /
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
@@ -16,14 +16,13 @@ mv tmpfile "${NGINX_CONFIG}"
|
||||
sed -i '/listen \[::\]/d' "${NGINX_CONFIG}"
|
||||
# Add ingress parameters
|
||||
sed -i "s|3000|$(bashio::addon.ingress_port)|g" "${NGINX_CONFIG}"
|
||||
sed -i "s|CWS|8082|g" "${NGINX_CONFIG}"
|
||||
sed -i "s|SUBFOLDER|/|g" "${NGINX_CONFIG}"
|
||||
sed -i '/proxy_buffering/a proxy_set_header Accept-Encoding "";' "${NGINX_CONFIG}"
|
||||
sed -i '/proxy_buffering/a sub_filter_once off;' "${NGINX_CONFIG}"
|
||||
sed -i '/proxy_buffering/a sub_filter_types *;' "${NGINX_CONFIG}"
|
||||
sed -i '/proxy_buffering/a sub_filter "vnc/index.html?autoconnect" "vnc/index.html?path=%%path%%/websockify?autoconnect";' "${NGINX_CONFIG}"
|
||||
sed -i "s|%%path%%|${SUBFOLDER:1}|g" "${NGINX_CONFIG}"
|
||||
|
||||
# Correct image
|
||||
sed -i "s|SUBFOLDERwebsockify|/websockify|g" "${NGINX_CONFIG}"
|
||||
|
||||
# Enable ingress
|
||||
cp "${NGINX_CONFIG}" /etc/nginx/sites-enabled
|
||||
|
||||
Reference in New Issue
Block a user