feat: add Exceptionless
This commit is contained in:
parent
80f5c1be1f
commit
ed072c229d
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BootstrapBlazor" Version="5.0.19" />
|
<PackageReference Include="BootstrapBlazor" Version="5.0.19" />
|
||||||
|
<PackageReference Include="Exceptionless.AspNetCore" Version="4.6.2" />
|
||||||
<PackageReference Include="Longbow.Logging" Version="5.0.0" />
|
<PackageReference Include="Longbow.Logging" Version="5.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
|
||||||
<PackageReference Include="Sentry.AspNetCore" Version="3.1.0" />
|
<PackageReference Include="Sentry.AspNetCore" Version="3.1.0" />
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using Bootstrap.DataAccess;
|
using Bootstrap.DataAccess;
|
||||||
|
using Exceptionless;
|
||||||
using Longbow.Web.SignalR;
|
using Longbow.Web.SignalR;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
@ -80,6 +81,7 @@ namespace Bootstrap.Admin
|
||||||
option.AssumeDefaultVersionWhenUnspecified = true;
|
option.AssumeDefaultVersionWhenUnspecified = true;
|
||||||
option.ApiVersionReader = ApiVersionReader.Combine(new HeaderApiVersionReader("api-version"), new QueryStringApiVersionReader("api-version"));
|
option.ApiVersionReader = ApiVersionReader.Combine(new HeaderApiVersionReader("api-version"), new QueryStringApiVersionReader("api-version"));
|
||||||
});
|
});
|
||||||
|
services.AddExceptionless();
|
||||||
services.AddControllersWithViews(options =>
|
services.AddControllersWithViews(options =>
|
||||||
{
|
{
|
||||||
options.Filters.Add<BootstrapAdminAuthorizeFilter>();
|
options.Filters.Add<BootstrapAdminAuthorizeFilter>();
|
||||||
|
@ -122,6 +124,7 @@ namespace Bootstrap.Admin
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
app.UseCors(builder => builder.WithOrigins(Configuration["AllowOrigins"].Split(',', StringSplitOptions.RemoveEmptyEntries)).AllowAnyHeader().AllowAnyMethod().AllowCredentials());
|
app.UseCors(builder => builder.WithOrigins(Configuration["AllowOrigins"].Split(',', StringSplitOptions.RemoveEmptyEntries)).AllowAnyHeader().AllowAnyMethod().AllowCredentials());
|
||||||
|
app.UseExceptionless();
|
||||||
app.UseBootstrapAdminAuthentication(RoleHelper.RetrievesByUserName, RoleHelper.RetrievesByUrl, AppHelper.RetrievesByUserName);
|
app.UseBootstrapAdminAuthentication(RoleHelper.RetrievesByUserName, RoleHelper.RetrievesByUrl, AppHelper.RetrievesByUserName);
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseSwagger(Configuration["SwaggerPathBase"].TrimEnd('/'));
|
app.UseSwagger(Configuration["SwaggerPathBase"].TrimEnd('/'));
|
||||||
|
|
|
@ -69,6 +69,9 @@
|
||||||
"Sentry": {
|
"Sentry": {
|
||||||
"Dsn": "https://70bdfff562e84fa7b9a43d65924ab9ad@sentry.io/1469396"
|
"Dsn": "https://70bdfff562e84fa7b9a43d65924ab9ad@sentry.io/1469396"
|
||||||
},
|
},
|
||||||
|
"Exceptionless": {
|
||||||
|
"ApiKey": "AgQlY1MRWpX5qOF2edpK2IZYBhgPYImhr4UnZdAT"
|
||||||
|
},
|
||||||
"TokenValidateOption": {
|
"TokenValidateOption": {
|
||||||
"Issuer": "BA",
|
"Issuer": "BA",
|
||||||
"Audience": "api",
|
"Audience": "api",
|
||||||
|
|
Loading…
Reference in New Issue