shadok-ai 0.20.63 → 0.20.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +7 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/public/index.html +16 -2
package/dist/server.js
CHANGED
|
@@ -8599,7 +8599,9 @@ function applyWidgetFlow(flow) {
|
|
|
8599
8599
|
setWaGuestSetupForCwd(loadConfig(), cwd, { ...waGuestSetupForCwd(loadConfig(), cwd), joined: true });
|
|
8600
8600
|
}
|
|
8601
8601
|
function widgetView(w) {
|
|
8602
|
-
|
|
8602
|
+
// The address in MEMORY, not the file: it also carries `SHADOK_PUBLIC_URL`,
|
|
8603
|
+
// which is never written down, and what `notePublicOrigin` learned a line ago.
|
|
8604
|
+
return { ...publicWidget(w), snippet: widgetSnippet(publicOrigin, w.id) };
|
|
8603
8605
|
}
|
|
8604
8606
|
app.get("/widgets", (req, res) => {
|
|
8605
8607
|
if (!accountAdmin(req, res, false, "view or change the web widgets"))
|
|
@@ -8614,6 +8616,10 @@ app.get("/widgets", (req, res) => {
|
|
|
8614
8616
|
app.put("/widgets", (req, res) => {
|
|
8615
8617
|
if (!accountAdmin(req, res, true, "view or change the web widgets"))
|
|
8616
8618
|
return;
|
|
8619
|
+
// Learn the public address HERE: the page's `/version` poll never teaches
|
|
8620
|
+
// it (a same-origin GET carries no `Origin`), this write does, and it is the
|
|
8621
|
+
// request that returns the snippet built from it.
|
|
8622
|
+
notePublicOrigin(req);
|
|
8617
8623
|
const refusal = migratedIsolationRefusal(DEPLOYMENT_MODE, groupsMigrated);
|
|
8618
8624
|
if (refusal)
|
|
8619
8625
|
return res.status(409).json({ error: refusal });
|