Seamus há 1 mês atrás
pai
commit
79d8449fee

+ 22 - 0
ERP.Application/Controllers/TestController.cs

@@ -0,0 +1,22 @@
+// <author></author>
+// <date></date>
+// <description></description>
+
+using ERP.Framework.WebApi;
+using Microsoft.AspNetCore.Mvc;
+
+namespace ERP.Application.Controllers
+{
+    [Route("test")]
+    public class TestController : BaseController
+    {
+        [HttpGet("asd")]
+        public IActionResult Test()
+        {
+            return new JsonResult(new
+            {
+                a = "asd"
+            });
+        }
+    }
+}

+ 0 - 6
ERP.Core/Controllers/SysUserController.cs

@@ -26,12 +26,6 @@ namespace ERP.Core.Controllers
             return Success(loginUser);
         }
 
-        [HttpGet]
-        public IActionResult GetList(long id)
-        {
-            return Success();
-        }
-
         [HttpGet("/{id}")]
         public IActionResult GetById(long id)
         {

+ 1 - 1
ERP.Framework/Middleware/AuthenticationMiddleware.cs

@@ -33,7 +33,7 @@ namespace ERP.Framework.Middleware
             var path = context.Request.Path.ToString();
             var securityConfig = _configuration.GetSection(FrameworkConstant.SECURITY_CONFIG).Get<SecurityConfig>() ?? new SecurityConfig();
 
-            if (securityConfig.WhiteList != null && UrlUtil.Match(w, securityConfig.WhiteList))
+            if (securityConfig.WhiteList != null && UrlUtil.Match(path, securityConfig.WhiteList))
             {
                 await next(context);
                 return;