Skip to content

Commit 07eee10

Browse files
committed
comment
1 parent b1a1904 commit 07eee10

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

chat/src/components/chat-provider.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ export function ChatProvider({ children }: PropsWithChildren) {
5757
const [serverStatus, setServerStatus] = useState<ServerStatus>("unknown");
5858
const eventSourceRef = useRef<EventSource | null>(null);
5959
const searchParams = useSearchParams();
60+
// NOTE(cian): When hosting this application on a subpath, we need to
61+
// ensure that the agent API URL is correctly set. Refer to
62+
// https://github.com/coder/coder/issues/18779#issuecomment-3133290494
6063
const defaultAgentAPIURL = new URL("../../", window.location.href).toString();
6164
const agentAPIUrl = searchParams.get("url") || defaultAgentAPIURL;
6265

0 commit comments

Comments
 (0)