Browse Source

😁响应头增加 Admin.NET 标识

zuohuaijun 2 years ago
parent
commit
4a36f4bf96
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Admin.NET/Admin.NET.Web.Core/Startup.cs

+ 6 - 0
Admin.NET/Admin.NET.Web.Core/Startup.cs

@@ -175,6 +175,12 @@ public class Startup : AppStartup
             app.UseHsts();
         }
 
+        app.Use(async (context, next) =>
+        {
+            context.Response.Headers.Add("Admin.NET", "Admin.NET");
+            await next();
+        });
+
         // 图像处理
         app.UseImageSharp();