From a9f1c4556e8cf9134c1d0fbb28cf6566a18c89bd Mon Sep 17 00:00:00 2001 From: Alex Ivanov Date: Fri, 19 Jul 2024 14:39:34 +0100 Subject: [PATCH 1/2] Only add Meticulous recorder when running in dev mode Local sessions via the go server contain server-side rendered data and such sessions cannot be simulated by Meticulous --- site/src/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/site/src/index.tsx b/site/src/index.tsx index 489d747a3c0a6..77dcd4fb8d7a2 100644 --- a/site/src/index.tsx +++ b/site/src/index.tsx @@ -31,9 +31,10 @@ async function startApp() { function isInternal() { return ( - window.location.hostname.indexOf("dev.coder.com") > -1 || - window.location.hostname.indexOf("localhost") > -1 || - window.location.hostname.indexOf("127.0.0.1") > -1 + process.env.NODE_ENV === "development" && ( + window.location.hostname.indexOf("localhost") > -1 || + window.location.hostname.indexOf("127.0.0.1") > -1 + ) ); } From 8f2962296440587f8a1ac34a87d3636aadf14e11 Mon Sep 17 00:00:00 2001 From: Alex Ivanov Date: Fri, 19 Jul 2024 17:06:29 +0100 Subject: [PATCH 2/2] run prettier --- site/src/index.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/site/src/index.tsx b/site/src/index.tsx index 77dcd4fb8d7a2..d34f936584a97 100644 --- a/site/src/index.tsx +++ b/site/src/index.tsx @@ -31,10 +31,9 @@ async function startApp() { function isInternal() { return ( - process.env.NODE_ENV === "development" && ( - window.location.hostname.indexOf("localhost") > -1 || - window.location.hostname.indexOf("127.0.0.1") > -1 - ) + process.env.NODE_ENV === "development" && + (window.location.hostname.indexOf("localhost") > -1 || + window.location.hostname.indexOf("127.0.0.1") > -1) ); }