From 41326a283bc468e6211784d2b676678fbd0bec51 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 21 Jul 2026 09:07:04 +0200 Subject: [PATCH] fix: complete HWPOD native Web readiness --- .../scripts/hwpod-native-vite.config.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/hwlab-cloud-web/scripts/hwpod-native-vite.config.ts b/web/hwlab-cloud-web/scripts/hwpod-native-vite.config.ts index 53c864c9..d50efd8a 100644 --- a/web/hwlab-cloud-web/scripts/hwpod-native-vite.config.ts +++ b/web/hwlab-cloud-web/scripts/hwpod-native-vite.config.ts @@ -33,7 +33,15 @@ function healthPlugin(): Plugin { return { name: "hwpod-native-health", configur function nativeRuntimeConfigPlugin(serialized: string | undefined): Plugin { const config = parseWorkbenchNativeRuntimeConfig(requiredString(serialized, "HWPOD_WEB_RUNTIME_CONFIG")); const inlineJson = JSON.stringify(config).replace(/ { + if (request.url !== "/v1/web-performance" || request.method !== "POST") return next(); + response.writeHead(204, { "cache-control": "no-store" }); + response.end(); + }); }, + transformIndexHtml() { return [{ tag: "script", injectTo: "head-prepend", children: `window.HWLAB_CLOUD_WEB_CONFIG=${inlineJson};` }]; }, + }; } function nativeSessionPlugin(serialized: string | undefined): Plugin { const profile = parseHwpodNativeAccessProfile(serialized);