Merge branch 'abp-dev' into abp

This commit is contained in:
橙子
2024-06-28 00:14:34 +08:00
6 changed files with 17 additions and 5 deletions

View File

@@ -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")