Merge branch 'master' of https://github.com/dotnetcore/FastGithub
This commit is contained in:
commit
049ea9812e
@ -72,7 +72,7 @@ namespace FastGithub.DomainResolve
|
|||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
this.logger.LogTrace($"由于{pureDns}解析{domain}失败,本次使用{fastDns}");
|
this.logger.LogWarning($"由于{pureDns}解析{domain}失败,本次使用{fastDns}");
|
||||||
return await LookupCoreAsync(fastDns, domain, cancellationToken);
|
return await LookupCoreAsync(fastDns, domain, cancellationToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,6 @@ namespace FastGithub.Http
|
|||||||
public HttpClient(DomainConfig domainConfig, IDomainResolver domainResolver)
|
public HttpClient(DomainConfig domainConfig, IDomainResolver domainResolver)
|
||||||
: this(domainConfig, new HttpClientHandler(domainResolver), disposeHandler: true)
|
: this(domainConfig, new HttpClientHandler(domainResolver), disposeHandler: true)
|
||||||
{
|
{
|
||||||
this.domainConfig = domainConfig;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -60,7 +60,7 @@ namespace FastGithub.ReverseProxy
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.logger.LogError($"{message}{Environment.NewLine}{exception.Message}");
|
this.logger.LogError($"{message}{Environment.NewLine}{exception}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,7 +105,7 @@ namespace FastGithub.ReverseProxy
|
|||||||
await context.Response.WriteAsJsonAsync(new
|
await context.Response.WriteAsJsonAsync(new
|
||||||
{
|
{
|
||||||
error = error.ToString(),
|
error = error.ToString(),
|
||||||
message = errorFeature.Exception?.ToString()
|
message = errorFeature.Exception?.Message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace FastGithub
|
namespace FastGithub
|
||||||
@ -41,6 +42,7 @@ namespace FastGithub
|
|||||||
.ConfigureWebHostDefaults(webBuilder =>
|
.ConfigureWebHostDefaults(webBuilder =>
|
||||||
{
|
{
|
||||||
webBuilder.UseStartup<Startup>();
|
webBuilder.UseStartup<Startup>();
|
||||||
|
webBuilder.UseShutdownTimeout(TimeSpan.FromSeconds(2d));
|
||||||
webBuilder.UseKestrel(kestrel =>
|
webBuilder.UseKestrel(kestrel =>
|
||||||
{
|
{
|
||||||
kestrel.ListenHttpReverseProxy();
|
kestrel.ListenHttpReverseProxy();
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
"Yarp": "Warning",
|
"Yarp": "Warning",
|
||||||
"System": "Warning",
|
"System": "Warning",
|
||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.AspNetCore.Server.Kestrel": "None"
|
"Microsoft.AspNetCore.Server.Kestrel": "Error"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user