From 9312b08e9a2bb3a59d8235f0f60dafa47e4bb0c0 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Wed, 2 Dec 2026 01:28:38 +0100 Subject: [PATCH] fix: load sandboxed raw apps behind a cookie-authenticated proxy (#12787) * fix: load sandboxed raw app bundles behind a cookie-authenticated proxy Co-Authored-By: Claude Opus 5.5 * fix: recover the script through the embedder when the stylesheet was refused Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- backend/windmill-api/src/apps.rs | 55 +++++++++++++++++-- .../components/raw_apps/RawAppPreview.svelte | 24 ++++++++ 2 files changed, 73 insertions(+), 6 deletions(-) diff --git a/backend/windmill-api/src/apps.rs b/backend/windmill-api/src/apps.rs index 8dce9f3f66..cbf8552495 100644 --- a/backend/windmill-api/src/apps.rs +++ b/backend/windmill-api/src/apps.rs @@ -1030,7 +1030,8 @@ async fn get_raw_app_data( /// HTML wrapper that hosts a raw-app bundle inside a sandboxed, opaque-origin /// iframe. Served by [`get_raw_app_data`] for the `.html` "file type". It loads -/// the bundle `.js`/`.css` as same-path subresources, shims web storage (which +/// the bundle `.js`/`.css` as same-path subresources (from the embedder when those +/// requests are refused), shims web storage (which /// an opaque origin disallows), and waits for the embedder's handshake before /// evaluating the bundle, so `window.ctx` — and `window.process.env` when the /// viewer approved SDK scopes — is set synchronously when it runs. That token is @@ -1040,7 +1041,7 @@ fn raw_app_wrapper_html(secret: &str) -> String { - +