mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:03:27 +08:00
【优化】短信发送ip记录增加127.0.0.1默认设置,防止出现docker下获取ip为空的问题。
This commit is contained in:
@@ -343,7 +343,7 @@ namespace CoreCms.Net.Services
|
||||
var dt = DateTime.Now;
|
||||
|
||||
//获取当前ip今日的发送记录
|
||||
var ip = _httpContextAccessor.HttpContext?.Connection.RemoteIpAddress != null ? _httpContextAccessor.HttpContext.Connection.RemoteIpAddress.MapToIPv4().ToString() : "";
|
||||
var ip = _httpContextAccessor.HttpContext?.Connection.RemoteIpAddress != null ? _httpContextAccessor.HttpContext.Connection.RemoteIpAddress.MapToIPv4().ToString() : "127.0.0.1";
|
||||
if (string.IsNullOrEmpty(ip))
|
||||
{
|
||||
jm.msg = "短信发送IP获取失败";
|
||||
|
||||
Reference in New Issue
Block a user