From d8c473b2e193ea3ef9ef39746dcd70e435e813a0 Mon Sep 17 00:00:00 2001 From: Jeremy Magland Date: Thu, 1 Aug 2024 11:40:46 -0400 Subject: [PATCH] Fix probeUrl check for http and https protocols --- .../CompilationServerConnectionControl.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/app/CompilationServerConnectionControl/CompilationServerConnectionControl.tsx b/gui/src/app/CompilationServerConnectionControl/CompilationServerConnectionControl.tsx index 0c3c17b..d4e0546 100644 --- a/gui/src/app/CompilationServerConnectionControl/CompilationServerConnectionControl.tsx +++ b/gui/src/app/CompilationServerConnectionControl/CompilationServerConnectionControl.tsx @@ -85,7 +85,7 @@ const useIsConnected = (stanWasmServerUrl: string) => { }, []); useEffect(() => { setIsConnected(false); - if (!probeUrl.startsWith("http") && !probeUrl.startsWith("https")) { + if (!probeUrl.startsWith("http://") && !probeUrl.startsWith("https://")) { // important to do this check because otherwise fetch may succeed because // the server of this web app may respond with success return;