@@ -165,7 +165,7 @@ namespace Masuit.MyBlogs.Core.Controllers
[HttpPost, ValidateAntiForgeryToken, AllowAccessFirewall, ResponseCache(Duration = 115, VaryByQueryKeys = new[] { "email" })]
public ActionResult GetViewToken(string email)
{
- if (string.IsNullOrEmpty(email) || !email.MatchEmail())
+ if (string.IsNullOrEmpty(email) || !email.MatchEmail().isMatch)
return ResultData(null, false, "请输入正确的邮箱!");
}
@@ -327,7 +327,7 @@ namespace Masuit.MyBlogs.Core.Controllers
@@ -16,7 +16,7 @@ namespace Masuit.MyBlogs.Core.Controllers
[HttpPost, ValidateAntiForgeryToken, ResponseCache(Duration = 115, VaryByQueryKeys = new[] { "email" })]
public ActionResult SendCode(string email)
@@ -12,6 +12,7 @@
"CertPath": "App_Data/cert/server.pfx", // https证书
"CertPassword": "cEHlnUGu" // 证书密码
},
+ "EmailDomainWhiteList": "masuit.com,ldqk.org,qq.com,163.com,gmail.com,outlook.com",
"UseRewriter": "NonWww", //NonWww:重定向到不带www的域名,WWW:重定向到带www的域名
"ConnString": "Server=127.0.0.1;Port=3306;Database=MyBlogs;Uid=root;Pwd=;Charset=utf8mb4",
//"ConnString": "Data Source=.;Initial Catalog=MyBlogs;Integrated Security=True",