增加授权
This commit is contained in:
@@ -47,7 +47,9 @@ namespace WMS.Web.Repositories.DependencyInjection
|
|||||||
string authorization = context.Request.Headers["Authorization"];
|
string authorization = context.Request.Headers["Authorization"];
|
||||||
string path = context.Request.Path.Value.ToLower();
|
string path = context.Request.Path.Value.ToLower();
|
||||||
string[] pathlist = path.Split('/');
|
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)
|
if (isLogin)
|
||||||
{
|
{
|
||||||
context.Response.StatusCode = 200;
|
context.Response.StatusCode = 200;
|
||||||
|
|||||||
Reference in New Issue
Block a user