This commit is contained in:
2026-08-08 11:33:09 +08:00
parent cb0792963c
commit bc14ec7bd2
12 changed files with 59 additions and 4 deletions
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
set -eu
runtime_file=/usr/share/nginx/html/runtime-config.js
client_web_url=${CLIENT_WEB_URL:-}
escaped_url=$(printf '%s' "$client_web_url" | sed 's/\\/\\\\/g; s/"/\\"/g; s/\r/\\r/g; s/\n/\\n/g')
printf "window.__CHONGCHONG_RUNTIME_CONFIG__ = { clientWebUrl: \"%s\" }\n" "$escaped_url" > "$runtime_file"