From 88384844425ea63edd35c288a4bfc21f30e0fbbd Mon Sep 17 00:00:00 2001 From: Nik Nasr Date: Mon, 18 Nov 2024 18:54:45 +0000 Subject: [PATCH] add service worker header scope to web ui Signed-off-by: Nik Nasr --- crates/admin/src/web_ui.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/admin/src/web_ui.rs b/crates/admin/src/web_ui.rs index cb17c9210..56d6a12e1 100644 --- a/crates/admin/src/web_ui.rs +++ b/crates/admin/src/web_ui.rs @@ -25,6 +25,7 @@ async fn serve_web_ui(uri: Uri) -> impl IntoResponse { header::CONTENT_TYPE, HeaderValue::from_str(mime_type.as_ref()).unwrap(), ) + .header("Service-Worker-Allowed", "/") .body(Full::from(file.contents())) .unwrap() } @@ -34,6 +35,7 @@ async fn serve_web_ui(uri: Uri) -> impl IntoResponse { header::CONTENT_TYPE, HeaderValue::from_str(mime_guess::mime::TEXT_HTML_UTF_8.as_ref()).unwrap(), ) + .header("Service-Worker-Allowed", "/") .body(Full::from( restate_web_ui::ASSETS .get_file("index.html")