diff --git a/COMCMS.Common/Utils.cs b/COMCMS.Common/Utils.cs index 3c76c4e..35b78c7 100644 --- a/COMCMS.Common/Utils.cs +++ b/COMCMS.Common/Utils.cs @@ -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; diff --git a/COMCMS.Web/Areas/AdminCP/Views/Article/ArticleCategoryList.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Article/ArticleCategoryList.cshtml index 4a4f1dd..eeff197 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Article/ArticleCategoryList.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Article/ArticleCategoryList.cshtml @@ -40,7 +40,7 @@ @m.Id -
+
@m.Counts diff --git a/COMCMS.Web/Areas/AdminCP/Views/Index/Main.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Index/Main.cshtml index b593f3b..00496ed 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Index/Main.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Index/Main.cshtml @@ -176,7 +176,7 @@ 客户端IP地址 - @ViewBag.remoteip + @(Utils.GetIP()) diff --git a/COMCMS.Web/Areas/AdminCP/Views/Product/CategoryList.cshtml b/COMCMS.Web/Areas/AdminCP/Views/Product/CategoryList.cshtml index d92215f..4bc1a95 100644 --- a/COMCMS.Web/Areas/AdminCP/Views/Product/CategoryList.cshtml +++ b/COMCMS.Web/Areas/AdminCP/Views/Product/CategoryList.cshtml @@ -39,7 +39,7 @@ @m.Id -
+
@m.Counts