From 8d17b858eec8206904271995f81c39a881697595 Mon Sep 17 00:00:00 2001 From: 18942506660 <18942506660@A18942506660> Date: Fri, 14 Jun 2024 09:48:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DependencyInjection/AuthorizationTokenSecurityPolicy.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WMS.Web.Repositories/DependencyInjection/AuthorizationTokenSecurityPolicy.cs b/src/WMS.Web.Repositories/DependencyInjection/AuthorizationTokenSecurityPolicy.cs index 9f26812d..4304d74c 100644 --- a/src/WMS.Web.Repositories/DependencyInjection/AuthorizationTokenSecurityPolicy.cs +++ b/src/WMS.Web.Repositories/DependencyInjection/AuthorizationTokenSecurityPolicy.cs @@ -47,7 +47,9 @@ namespace WMS.Web.Repositories.DependencyInjection string authorization = context.Request.Headers["Authorization"]; string path = context.Request.Path.Value.ToLower(); string[] pathlist = path.Split('/'); - bool isLogin = pathlist.Where(x => x == "login" || x.ToLower() == "heart" || x.ToLower() == "test" || x.ToLower() == "serialnumber" || x.ToLower() == "barcode").Any(); + bool isLogin = pathlist.Where(x => x == "login" || x.ToLower() == "heart" + || x.ToLower() == "test" || x.ToLower() == "serialnumber" || x.ToLower() == "barcode" || + x.ToLower() == "swagger").Any(); if (isLogin) { context.Response.StatusCode = 200;