diff --git a/deployment/cloud/admin.mjs b/deployment/cloud/admin.mjs
index 3da6f5c62..364aafa79 100644
--- a/deployment/cloud/admin.mjs
+++ b/deployment/cloud/admin.mjs
@@ -90,6 +90,13 @@ if (Object.keys(SUBDOMAINS).length) {
const html = readFileSync(leaf, 'utf8').replace(/
]*)>/i, ``)
return new Response(html, { headers: { ...headers, 'content-type': 'text/html; charset=utf-8', 'cache-control': 'no-cache' } })
}
+ // /embed-test: every web plugin in this host's tree, embedded as JavaScript (deployment/cloud/embed-test.html,
+ // read per request from the pulled checkout, so the page follows the branch without a restart).
+ if (url.pathname === '/embed-test' || url.pathname === '/embed-test/') {
+ const page = '/app/repo/deployment/cloud/embed-test.html'
+ if (!existsSync(page)) return text('not found', 404)
+ return new Response(readFileSync(page, 'utf8'), { headers: { ...headers, 'content-type': 'text/html; charset=utf-8', 'cache-control': 'no-cache' } })
+ }
const f = normalize(join(CDN, decodeURIComponent(url.pathname)))
if (!f.startsWith(CDN + '/dx-maps/')) return text('not found', 404)
const file = existsSync(f) && statSync(f).isDirectory() ? join(f, 'index.html') : f
diff --git a/deployment/cloud/embed-test.html b/deployment/cloud/embed-test.html
new file mode 100644
index 000000000..7f5a60972
--- /dev/null
+++ b/deployment/cloud/embed-test.html
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+Embed test
+
+
+
+Embed test
+Reading the manifest…
+
+
+
+