|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using System.Security.Policy;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Gateway;
|
|
|
|
|
|
|
|
|
@ -20,9 +21,12 @@ public class JwtSafeMiddleware
|
|
|
|
|
|
|
|
|
|
if (context.Request.Method == "GET" || context.Request.Method == "POST")
|
|
|
|
|
{
|
|
|
|
|
var ignoreUrl = AppSetting.app(new string[] { "Cors", "IgnorePath" });
|
|
|
|
|
// Console.WriteLine(context.Request.Path);
|
|
|
|
|
var path = context.Request.Path.ToString().ToLower();
|
|
|
|
|
if (path.Contains("swagger") || path.Contains("login")|| path.Contains("tenantregister") || path.Contains("linkattach") || path.Contains("printtempfile") || path.Contains("favicon") || path.Contains("clientuserlogin") )
|
|
|
|
|
if(ignoreUrl.Split(",", StringSplitOptions.RemoveEmptyEntries).ToArray().Contains(path))
|
|
|
|
|
//if (path.Contains("swagger") || path.Contains("login")|| path.Contains("tenantregister") || path.Contains("linkattach") || path.Contains("printtempfile")
|
|
|
|
|
// || path.Contains("favicon") || path.Contains("clientuserlogin") || path.Contains("addbookingstatuslog"))
|
|
|
|
|
{
|
|
|
|
|
//跳过swagger及login
|
|
|
|
|
}
|
|
|
|
|