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);