mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #4 from stevehayles/server-validation
Allow valid https requests in .NET Core
This commit is contained in:
commit
82911c8a20
@ -59,7 +59,17 @@ namespace Emby.Server.Implementations.HttpClientManager
|
||||
|
||||
if (!_httpClients.TryGetValue(key, out var client))
|
||||
{
|
||||
client = new HttpClient()
|
||||
var httpClientHandler = new HttpClientHandler()
|
||||
{
|
||||
ServerCertificateCustomValidationCallback = (message, cert, chain, errors) =>
|
||||
{
|
||||
var success = errors == System.Net.Security.SslPolicyErrors.None;
|
||||
_logger.LogDebug("Validating certificate {Cert}. Success {1}", cert, success);
|
||||
return success;
|
||||
}
|
||||
};
|
||||
|
||||
client = new HttpClient(httpClientHandler)
|
||||
{
|
||||
BaseAddress = new Uri(url)
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user