feat: 完成配置模块
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Net.Http;
|
||||
using System.Diagnostics;
|
||||
using System.Net.Http;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
@@ -8,11 +9,13 @@ using static System.Net.WebRequestMethods;
|
||||
|
||||
namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Middlewares
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
public class ApiInfoMiddleware : IMiddleware, ITransientDependency
|
||||
{
|
||||
|
||||
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
|
||||
{
|
||||
context.Response.OnStarting(() =>
|
||||
context.Response.OnStarting([DebuggerStepThrough] () =>
|
||||
{
|
||||
if (context.Response.StatusCode == StatusCodes.Status200OK
|
||||
&& context.Response.Headers["Content-Type"].ToString() == "application/vnd.ms-excel")
|
||||
|
||||
Reference in New Issue
Block a user