fix: wizard preview TLS, progress storage and inactive bot logs (#2651)

This commit is contained in:
RockChinQ
2026-10-12 00:15:58 +08:00
committed by GitHub
parent 13446ecfd3
commit 80ea528ca0
5 changed files with 57 additions and 3 deletions
+11
View File
@@ -174,6 +174,17 @@
bubbleIcon: "__LANGBOT_BUBBLE_ICON__",
};
// Wizard previews must use the browser-visible backend URL. Behind a TLS
// proxy the server's request URL can be HTTP even when widget.js uses HTTPS.
// External embeds retain their configured public webhook prefix.
if (scriptEl && scriptEl.src) {
var scriptUrl = new URL(scriptEl.src, document.baseURI);
if (scriptUrl.searchParams.get("preview") === "wizard") {
CONFIG.baseUrl = scriptUrl.origin;
CONFIG.logoUrl = CONFIG.baseUrl + "/api/v1/embed/logo";
}
}
// ========== Styles ==========
var STYLES =
'\