From bbb8686a09f52a675b4d4bf59d158ce489f87b7c Mon Sep 17 00:00:00 2001 From: xiaolipro <2357729423@qq.com> Date: Sat, 26 Jul 2025 09:39:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9Arequest=20buff=20read?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/InterfaceForward.Api/InterfaceForwardApiModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/InterfaceForward.Api/InterfaceForwardApiModule.cs b/src/InterfaceForward.Api/InterfaceForwardApiModule.cs index 4d5b5b9..5bcd6dc 100644 --- a/src/InterfaceForward.Api/InterfaceForwardApiModule.cs +++ b/src/InterfaceForward.Api/InterfaceForwardApiModule.cs @@ -47,6 +47,12 @@ public class InterfaceForwardApiModule : FakeModule public override void ConfigureApplication(ApplicationConfigureContext context) { var app = context.GetWebApplication(); + + app.Use(async (httpContext, next) => + { + httpContext.Request.EnableBuffering(); + await next.Invoke(); + }); // Add Aspire default endpoints. app.MapDefaultEndpoints();