From 12271687c276571f231ec783fca7e658b0dd4f9a Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 30 Mar 2026 11:34:25 +0200 Subject: [PATCH] Fix DrawDB: switch Caddy to Nginx, add crypto.randomUUID polyfill - Replace Caddy with Nginx (matches upstream Dockerfile) - Add crypto.randomUUID polyfill in index.html for non-HTTPS access (browsers only expose crypto.randomUUID in secure contexts) - Apply polyfill also in update script --- ct/drawdb.sh | 1 + install/drawdb-install.sh | 28 +++++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ct/drawdb.sh b/ct/drawdb.sh index 9d75ed63..ff4c17d7 100644 --- a/ct/drawdb.sh +++ b/ct/drawdb.sh @@ -36,6 +36,7 @@ function update_script() { cd /opt/drawdb $STD npm ci NODE_OPTIONS="--max-old-space-size=4096" $STD npm run build + sed -i '/
/a ' /opt/drawdb/dist/index.html msg_ok "Rebuilt Frontend" msg_ok "Updated successfully!" fi diff --git a/install/drawdb-install.sh b/install/drawdb-install.sh index 68f2b16e..e1a9cc48 100644 --- a/install/drawdb-install.sh +++ b/install/drawdb-install.sh @@ -14,7 +14,7 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt install -y caddy +$STD apt install -y nginx msg_ok "Installed Dependencies" NODE_VERSION="20" setup_nodejs @@ -26,16 +26,26 @@ $STD npm ci NODE_OPTIONS="--max-old-space-size=4096" $STD npm run build msg_ok "Built Frontend" -msg_info "Configuring Caddy" -cat <