From 4593311ec5291b824847a7783548aff9ccdf2ed1 Mon Sep 17 00:00:00 2001 From: jianweie code Date: Fri, 2 Aug 2024 10:53:01 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E7=9F=AD?= =?UTF-8?q?=E4=BF=A1=E5=8F=91=E9=80=81ip=E8=AE=B0=E5=BD=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0127.0.0.1=E9=BB=98=E8=AE=A4=E8=AE=BE=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E5=87=BA=E7=8E=B0docker=E4=B8=8B=E8=8E=B7?= =?UTF-8?q?=E5=8F=96ip=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Services/Message/CoreCmsSmsServices.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs b/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs index db601710..d0527508 100644 --- a/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs +++ b/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs @@ -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获取失败";