mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-09 19:04:44 +08:00
sync with OpenAuth.Core
This commit is contained in:
@@ -4,10 +4,10 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using Autofac;
|
||||
using IdentityServer4.AccessTokenValidation;
|
||||
using Infrastructure.Extensions;
|
||||
using Infrastructure.Extensions.AutofacManager;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
@@ -38,6 +38,11 @@ namespace OpenAuth.WebApi
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.Configure<ApiBehaviorOptions>(options =>
|
||||
{
|
||||
options.SuppressModelStateInvalidFilter = true;
|
||||
});
|
||||
|
||||
services.AddSingleton(provider =>
|
||||
{
|
||||
var service = provider.GetRequiredService<ILogger<StartupLogger>>();
|
||||
@@ -161,8 +166,10 @@ namespace OpenAuth.WebApi
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostEnvironment env)
|
||||
public void Configure(IApplicationBuilder app, IHostEnvironment env, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddLog4Net();
|
||||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
|
||||
Reference in New Issue
Block a user