Skip to content

Commit

Permalink
Fix probeUrl check for http and https protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
magland committed Aug 1, 2024
1 parent 14e7691 commit d8c473b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d8c473b

Please sign in to comment.