Open OSM tiles over TLS in the sandbox

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWZ9CKZsNxtD5Jr9bYD
This commit is contained in:
Krzysztof Rudnicki 2026-11-10 18:18:00 +01:00
parent d0bb8d700e
commit ba9e9c31c0

View File

@ -62,7 +62,9 @@ class SandboxHttpOverrides extends HttpOverrides {
}
if (proxyHost == null && allowsTile(uri)) {
debugPrint('WorkoutSandbox: allowing OSM tile ${uri.path}');
return Socket.startConnect(uri.host, uri.port);
// A connection factory must return the TLS socket itself; a plain
// one makes the server answer https with "Invalid request method".
return SecureSocket.startConnect(uri.host, uri.port);
}
debugPrint(
'WorkoutSandbox: refused network connection to ${uri.host} — the '