Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a9f1c45

Browse files
committed
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
1 parent c88e416 commit a9f1c45

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

site/src/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ async function startApp() {
3131

3232
function isInternal() {
3333
return (
34-
window.location.hostname.indexOf("dev.coder.com") > -1 ||
35-
window.location.hostname.indexOf("localhost") > -1 ||
36-
window.location.hostname.indexOf("127.0.0.1") > -1
34+
process.env.NODE_ENV === "development" && (
35+
window.location.hostname.indexOf("localhost") > -1 ||
36+
window.location.hostname.indexOf("127.0.0.1") > -1
37+
)
3738
);
3839
}
3940

0 commit comments

Comments
 (0)