优化部分代码

This commit is contained in:
2024-10-06 16:23:34 +08:00
parent e83b4c01fd
commit cb581ee8cc
4 changed files with 7 additions and 3 deletions
+4
View File
@@ -209,6 +209,10 @@ namespace COMCMS.Common
{
http = "https://";
}
if (MyHttpContext.Current.Request.Headers["X-Scheme"].ToString() == "https")//增加判断反向代理
{
http = "https://";
}
string port = MyHttpContext.Current.Request.Host.Port.ToString();
if (string.IsNullOrEmpty(port) || port == "80" || port == "443")
return http + MyHttpContext.Current.Request.Host.Host;