diff --git a/start.sh b/start.sh index dd8426a..a20dedc 100644 --- a/start.sh +++ b/start.sh @@ -1037,6 +1037,66 @@ echo "==> Created Caddy config at /app/data/caddy/Caddyfile" # Start Caddy server echo "==> Starting Caddy server" + +# First inject the config.js script tags into all HTML files +echo "==> Injecting config.js into web application HTML files" + +# Function to inject the script tag +inject_script_tag() { + file="$1" + if [ -f "$file" ]; then + echo "==> Injecting config.js into $file" + # Make a backup just in case + cp "$file" "${file}.bak" + # Insert the script tag right after the opening head tag + sed -i 's/
/\n