assume http protocol for localhost

This commit is contained in:
Fabian Freund
2025-09-16 05:19:26 +02:00
parent 98a4c7dda2
commit 0d65af2efa
+1 -1
View File
@@ -40,7 +40,7 @@ Uri? tryParseUrl(String? input, {bool eagerParsing = false}) {
if (_domainRegex.hasMatch(firstSegment)) {
uri = Uri.tryParse('https://$input')?.replace(port: port);
} else if (firstSegment == 'localhost') {
uri = Uri.tryParse('https://$input')?.replace(port: port);
uri = Uri.tryParse('http://$input')?.replace(port: port);
} else if (InternetAddress.tryParse(firstSegment) != null) {
uri = Uri.tryParse('https://$input')?.replace(port: port);
}