From 4bde91a234d201fef9256971ce4af005f8b003b8 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 17 Jun 2026 10:47:04 +1000 Subject: [PATCH] Adjust "default" value for strictHttps (#835) Note: all calls to this function override the default, so this is *not* a functional change --- lib/api.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/api.dart b/lib/api.dart index 03bcd152..41d5d9c4 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -1193,7 +1193,12 @@ class InvenTreeAPI { return response.isValid() && response.statusCode == 200; } - HttpClient createClient(String url, {bool strictHttps = false}) { + /* + * Create a new HttpClient, with the appropriate certificate handling + * Note that for some instances, we may wish to ignore certificate errors (e.g. self-signed certificates) + * In this case, we will allow the user to disable "strict HTTPS" mode + */ + HttpClient createClient(String url, {bool strictHttps = true}) { var client = HttpClient(); client.badCertificateCallback =