1
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 12s
Docker Build & Deploy / Deploy to Production (push) Successful in 4s

This commit is contained in:
孙诚
2025-03-06 17:25:10 +08:00
parent 1426ba7d04
commit 0fcea99a0b
3 changed files with 11 additions and 8 deletions

View File

@@ -19,12 +19,15 @@ public class ChineseNfoRegistry : Registry, IChineseNfoRegistry
_configuration = configuration;
_logger = logger;
var httpClientHandler = new HttpClientHandler();
var proxyAddress = _configuration["ChineseNfo:HttpProxy"];
var httpClientHandler = new HttpClientHandler
if(string.IsNullOrEmpty(proxyAddress) == false)
{
Proxy = string.IsNullOrEmpty(proxyAddress) ? null : new WebProxy(proxyAddress, false),
UseProxy = !string.IsNullOrEmpty(proxyAddress)
};
httpClientHandler.Proxy = string.IsNullOrEmpty(proxyAddress) ? null : new WebProxy(proxyAddress, false);
httpClientHandler.UseProxy = !string.IsNullOrEmpty(proxyAddress);
}
_client = new HttpClient(httpClientHandler);
_client.BaseAddress = new Uri("https://api.themoviedb.org");