mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 08:07:42 +00:00
client/web: don't show login button if /ok errors
When displaying the login client, we check for connectivity to the management client by calling it's /ok handler. If that response is non-200, then there is something wrong with the management client, so don't render the login button. Updates #10261 Signed-off-by: Will Norris <will@tailscale.com>
This commit is contained in:
parent
3aa6468c63
commit
fc69301fd1
@ -106,9 +106,11 @@ function LoginPopoverContent({
|
|||||||
}
|
}
|
||||||
setIsRunningCheck(true)
|
setIsRunningCheck(true)
|
||||||
fetch(`http://${node.IPv4}:5252/ok`, { mode: "no-cors" })
|
fetch(`http://${node.IPv4}:5252/ok`, { mode: "no-cors" })
|
||||||
.then(() => {
|
.then((r) => {
|
||||||
|
if (r.ok) {
|
||||||
|
setCanConnectOverTS(true)
|
||||||
|
}
|
||||||
setIsRunningCheck(false)
|
setIsRunningCheck(false)
|
||||||
setCanConnectOverTS(true)
|
|
||||||
})
|
})
|
||||||
.catch(() => setIsRunningCheck(false))
|
.catch(() => setIsRunningCheck(false))
|
||||||
}, [auth.viewerIdentity, isRunningCheck, node.IPv4])
|
}, [auth.viewerIdentity, isRunningCheck, node.IPv4])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user