Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(desktop): let dev canvas artifacts load past local network access checks (#83057)

Peter Kirkhamc0c4e5a54a1a
diff --git a/products/desktop/apps/code/src/main/bootstrap.ts b/products/desktop/apps/code/src/main/bootstrap.ts
index f7e0eaa8f93c..7b7a12b6122b 100644
--- a/products/desktop/apps/code/src/main/bootstrap.ts
+++ b/products/desktop/apps/code/src/main/bootstrap.ts
@@ -89,6 +89,14 @@ if (isDev) {
);
}
+// Chromium's Local Network Access checks treat the dev artifact origin
+// (localhost) as local network and the sandboxed canvas iframe's opaque origin
+// as public, so the artifact navigation is blocked with no way to grant the
+// permission. Production artifact origins are public and unaffected.
+if (isDev) {
+ app.commandLine.appendSwitch("disable-features", "LocalNetworkAccessChecks");
+}
+
crashReporter.start({ uploadToServer: false });
// Force IPv4 resolution when "localhost" is used so the agent hits 127.0.0.1