From 4ab0de301656293891ebfe886cb24b77cb110fef Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Wed, 28 Dec 2022 14:21:55 +1100 Subject: [PATCH] Better deafult address for http connection --- src/components/PageComponents/Connect/HTTP.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/PageComponents/Connect/HTTP.tsx b/src/components/PageComponents/Connect/HTTP.tsx index 7da12fa1..03c54727 100644 --- a/src/components/PageComponents/Connect/HTTP.tsx +++ b/src/components/PageComponents/Connect/HTTP.tsx @@ -20,7 +20,11 @@ export const HTTP = (): JSX.Element => { tls: boolean; }>({ defaultValues: { - ip: "meshtastic.local", + ip: ["client.meshtasti.org", "localhost"].includes( + window.location.hostname + ) + ? "meshtastic.local" + : window.location.hostname, tls: location.protocol === "https:" } });