From 70a791bafeef5760ff1ed8c6a19de3e917671db8 Mon Sep 17 00:00:00 2001 From: Rohan Godha Date: Thu, 25 Dec 2025 23:26:46 -0500 Subject: [PATCH] fix: default to window.location.origin this fixes tailscaleusing opencode web with tailscale where you are, for example, on a url like `nixos:4096`. on this website, we fail to contact the backend, because the dev server is running on a different computer (and therefore, we can not access the localhost of that computer) --- packages/app/src/app.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/app.tsx b/packages/app/src/app.tsx index 11216643e5b..de8fcf7d124 100644 --- a/packages/app/src/app.tsx +++ b/packages/app/src/app.tsx @@ -38,7 +38,7 @@ const url = iife(() => { if (import.meta.env.DEV) return `http://${import.meta.env.VITE_OPENCODE_SERVER_HOST ?? "localhost"}:${import.meta.env.VITE_OPENCODE_SERVER_PORT ?? "4096"}` - return "http://localhost:4096" + return window.location.origin }) export function App() {