/***********************************************************************
* Project: CoreCms.Net *
* Web: https://CoreCms.Net *
* ProjectName: 核心内容管理系统 *
* Author: 大灰灰 *
* Email: JianWeie@163.com *
* Versions: 1.0 *
* CreateTime: 2020-02-03 23:29:27
* FileName: MiddlewareHelpers
* ClassDescription:
***********************************************************************/
using CoreCms.Net.Core;
using Microsoft.AspNetCore.Builder;
namespace CoreCms.Net.Middlewares
{
///
/// 中间件
///
public static class MiddlewareHelpers
{
///
/// 请求响应中间件
///
///
///
public static IApplicationBuilder UseRequestResponseLog(this IApplicationBuilder app)
{
return app.UseMiddleware();
}
///
/// 异常处理中间件(后端模式)
///
///
///
public static IApplicationBuilder UseExceptionHandlerMiddForAdmin(this IApplicationBuilder app)
{
return app.UseMiddleware();
}
///
/// 异常处理中间件(客户端)
///
///
///
public static IApplicationBuilder UseExceptionHandlerMiddForClent(this IApplicationBuilder app)
{
return app.UseMiddleware();
}
///
/// IP请求中间件
///
///
///
public static IApplicationBuilder UseIpLogMildd(this IApplicationBuilder app)
{
return app.UseMiddleware();
}
///
/// 用户访问接口日志中间件
///
///
///
public static IApplicationBuilder UseRecordAccessLogsMildd(this IApplicationBuilder app)
{
return app.UseMiddleware();
}
///
/// Swagger授权中间件
///
///
///
public static IApplicationBuilder UseSwaggerAuthorizedMildd(this IApplicationBuilder app)
{
return app.UseMiddleware();
}
}
}