fix(#I12MIP): Gitee 接口健康检查可配置
#Comment comment #I12MIP #Issue close https://gitee.com/LongbowEnterprise/dashboard/issues?id=I12MIP
This commit is contained in:
parent
3fff9fa555
commit
b386af1ccc
|
@ -1,4 +1,5 @@
|
|||
using Bootstrap.Admin.HealthChecks;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection
|
||||
{
|
||||
|
@ -17,7 +18,10 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
var builder = services.AddHealthChecks();
|
||||
builder.AddCheck<DBHealthCheck>("db");
|
||||
builder.AddBootstrapAdminHealthChecks();
|
||||
builder.AddCheck<GiteeHttpHealthCheck>("Gitee");
|
||||
|
||||
var config = services.BuildServiceProvider().GetRequiredService<IConfiguration>();
|
||||
var checkGitee = config.GetValue("GiteeHealthChecks", false);
|
||||
if (checkGitee) builder.AddCheck<GiteeHttpHealthCheck>("Gitee");
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
],
|
||||
"SwaggerPathBase": "",
|
||||
"AllowOrigins": "http://localhost,http://ba.sdgxgz.cn",
|
||||
"GiteeHealthChecks": false,
|
||||
"Sentry": {
|
||||
"Dsn": "https://70bdfff562e84fa7b9a43d65924ab9ad@sentry.io/1469396"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue