diff --git a/Intersect.Editor/Forms/FrmUploadToServer.cs b/Intersect.Editor/Forms/FrmUploadToServer.cs index 83de87ea8e..09c9c73037 100644 --- a/Intersect.Editor/Forms/FrmUploadToServer.cs +++ b/Intersect.Editor/Forms/FrmUploadToServer.cs @@ -681,7 +681,20 @@ private async Task PerformUpload() var totalFiles = files.Length; var uploadedFiles = 0; - using var httpClient = new HttpClient + // Create HTTP client with SSL bypass for localhost + var handler = new HttpClientHandler(); + var uri = new Uri(serverUrl); + if (uri.Host.Equals("localhost", StringComparison.OrdinalIgnoreCase) || + uri.Host == "127.0.0.1" || + uri.Host.StartsWith("192.168.") || + uri.Host.StartsWith("10.") || + uri.Host.StartsWith("172.")) + { + // Bypass SSL validation for local/private network addresses + handler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true; + } + + using var httpClient = new HttpClient(handler) { Timeout = TimeSpan.FromMinutes(30) }; @@ -819,7 +832,21 @@ private async void btnTestUrl_Click(object sender, EventArgs e) try { var serverUrl = txtServerUrl.Text.TrimEnd('/'); - using var httpClient = new HttpClient + + // Create HTTP client with SSL bypass for localhost + var handler = new HttpClientHandler(); + var uri = new Uri(serverUrl); + if (uri.Host.Equals("localhost", StringComparison.OrdinalIgnoreCase) || + uri.Host == "127.0.0.1" || + uri.Host.StartsWith("192.168.") || + uri.Host.StartsWith("10.") || + uri.Host.StartsWith("172.")) + { + // Bypass SSL validation for local/private network addresses + handler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true; + } + + using var httpClient = new HttpClient(handler) { Timeout = TimeSpan.FromSeconds(10) };