From cb581ee8ccafc6ce4d39b97335c8acbed0a51a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BC=AB=E6=B8=B8=E8=80=85?= Date: Sun, 6 Oct 2024 16:23:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- COMCMS.Common/Utils.cs | 4 ++++ .../Areas/AdminCP/Views/Article/ArticleCategoryList.cshtml | 2 +- COMCMS.Web/Areas/AdminCP/Views/Index/Main.cshtml | 2 +- COMCMS.Web/Areas/AdminCP/Views/Product/CategoryList.cshtml | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) 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