Merge branch 'dev-chinese' into dev

This commit is contained in:
Argo Zhang 2019-09-29 13:22:25 +08:00
commit 173c4543f6
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
3 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,7 @@
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Sentry.AspNetCore" Version="2.0.0-beta4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc3" />
</ItemGroup>

View File

@ -23,6 +23,6 @@ namespace Bootstrap.Admin
/// <returns></returns>
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(builder => builder.UseStartup<Startup>());
.ConfigureWebHostDefaults(builder => builder.UseSentry().UseStartup<Startup>());
}
}

View File

@ -14,6 +14,8 @@ using Microsoft.Extensions.Hosting;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Text.Encodings.Web;
using System.Text.Unicode;
namespace Bootstrap.Admin
{
@ -43,7 +45,7 @@ namespace Bootstrap.Admin
/// <param name="services"></param>
public void ConfigureServices(IServiceCollection services)
{
//services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.