Merge pull request #2520 from alexbelgium/copilot/update-ingress-correction-script

Fix webtop KDE/XFCE ingress: replace CWS and SUBFOLDER placeholders in nginx config
This commit is contained in:
Alexandre
2026-02-23 09:15:02 +01:00
committed by GitHub
5 changed files with 10 additions and 5 deletions

View File

@@ -1,5 +1,8 @@
- Added support for configuring extra environment variables via the `env_vars` add-on option alongside config.yaml. See https://github.com/alexbelgium/hassio-addons/wiki/Add-Environment-variables-to-your-Addon-2 for details.
## 4.16-r0-ls95-5 (2026-02-23)
- Fix ingress: replace CWS port placeholder with 8082 and SUBFOLDER with /
## 4.16-r0-ls95-4 (2025-06-01)
- Minor bugs fixed
## 4.16-r0-ls94-4 (2025-05-28)

View File

@@ -138,5 +138,5 @@ slug: webtop-kde
tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: 4.16-r0-ls95-4
version: 4.16-r0-ls95-5
video: true

View File

@@ -1,4 +1,7 @@
## 4.16-r0-ls94-2 (2026-02-23)
- Fix ingress: replace CWS port placeholder with 8082 and SUBFOLDER with /
## 4.16-r0-ls94 (2026-02-21)
- Update to latest version from linuxserver/docker-webtop (changelog : https://github.com/linuxserver/docker-webtop/releases)

View File

@@ -143,5 +143,5 @@ slug: webtop
tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "4.16-r0-ls94"
version: "4.16-r0-ls94-2"
video: true

View File

@@ -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