We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1a1904 commit 07eee10Copy full SHA for 07eee10
chat/src/components/chat-provider.tsx
@@ -57,6 +57,9 @@ export function ChatProvider({ children }: PropsWithChildren) {
57
const [serverStatus, setServerStatus] = useState<ServerStatus>("unknown");
58
const eventSourceRef = useRef<EventSource | null>(null);
59
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
63
const defaultAgentAPIURL = new URL("../../", window.location.href).toString();
64
const agentAPIUrl = searchParams.get("url") || defaultAgentAPIURL;
65
0 commit comments