Commit 33e00dd5 by 泽锋 李

优化导出

parent e74c79f2
...@@ -35,11 +35,16 @@ namespace AutoTurnOver.Models ...@@ -35,11 +35,16 @@ namespace AutoTurnOver.Models
} }
if (!isDefined) if (!isDefined)
{ {
isDefined = controllerActionDescriptor.ControllerTypeInfo.GetCustomAttributes(inherit: true).Any(a => a.GetType().Equals(typeof(NoLoginAttribute))); isDefined = controllerActionDescriptor.ControllerTypeInfo.GetCustomAttributes(inherit: true)
.Any(a => a.GetType().Equals(typeof(NoLoginAttribute)));
} }
if (isDefined) return; if (isDefined) return;
string token = context.Request.Headers["Authorization"]; string token = context.Request.Headers["Authorization"];
if (string.IsNullOrWhiteSpace(token))
{
token = context.Request.Query["token"].FirstOrDefault();
}
if (token != null) if (token != null)
{ {
var getTokenValid = ConfigHelper.GetValue("Saas_GetTokenValid").ToString(); var getTokenValid = ConfigHelper.GetValue("Saas_GetTokenValid").ToString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment