request: Use a stable URL for the isOnline check.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-03-28 19:42:53 -07:00
committed by Anders Kaseorg
parent 28db945b91
commit c42aafe0b9

View File

@@ -102,7 +102,8 @@ export const _saveServerIcon = async (url: string, session: Electron.session): P
export const _isOnline = async (url: string, session: Electron.session): Promise<boolean> => {
try {
const response = await fetchResponse(net.request({
url: `${url}/static/favicon.ico`,
method: 'HEAD',
url: `${url}/api/v1/server_settings`,
session
}));
const isValidResponse = response.statusCode >= 200 && response.statusCode < 400;