From c3899dbdce1a78408a6d390aa34187d08018f05a Mon Sep 17 00:00:00 2001 From: rohow Date: Mon, 14 Oct 2024 11:21:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(nginx):=20=E4=BF=AE=E6=94=B9=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=E6=A8=A1=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/infra/net/nginx/captcha.html | 270 ++++++++++++ apps/infra/net/nginx/configmap-html.yaml | 531 ++--------------------- apps/infra/net/nginx/error.html | 243 ----------- apps/infra/net/nginx/helmchart.yaml | 26 +- 4 files changed, 317 insertions(+), 753 deletions(-) create mode 100644 apps/infra/net/nginx/captcha.html delete mode 100644 apps/infra/net/nginx/error.html diff --git a/apps/infra/net/nginx/captcha.html b/apps/infra/net/nginx/captcha.html new file mode 100644 index 0000000..e34958a --- /dev/null +++ b/apps/infra/net/nginx/captcha.html @@ -0,0 +1,270 @@ + + + + + + 出于安全原因 请完成验证 + + + + +
+
+
+
+
+
+
+
+
+

FillCode

+
+

请完成验证

+

请完成下面验证, 页面将会自动跳转到访问页面。

+
+
+
请稍等...
+
+
+ 联系我们 +
+
+ + + diff --git a/apps/infra/net/nginx/configmap-html.yaml b/apps/infra/net/nginx/configmap-html.yaml index 5e2e862..818804f 100644 --- a/apps/infra/net/nginx/configmap-html.yaml +++ b/apps/infra/net/nginx/configmap-html.yaml @@ -4,13 +4,14 @@ metadata: name: custom-html namespace: infra-net data: - 403.html: | + captcha.html: | - 403 禁止访问 + 出于安全原因 请完成验证 + - - -
-
-
-
-
-
-
-
-
-

404

-
-

页面未找到

-

您正在寻找的页面可能已被删除、名称已更改或暂时不可用。

- 回到首页 -
-
- - - 5xx.html: | - - - - - - 500 服务器错误 - - - -
-
-
-
-
-
-
-
-
-

500

-
-

服务器出错

-

请稍后再试,或者返回主页。
如果问题持续存在,请联系我们,我们会尽快修复。

- 回到首页 - 联系我们 -
-
- - diff --git a/apps/infra/net/nginx/error.html b/apps/infra/net/nginx/error.html deleted file mode 100644 index a325a2a..0000000 --- a/apps/infra/net/nginx/error.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - 404 页面未找到 - - - -
-
-
-
-
-
-
-
-
-

404

-
-

页面未找到

-

您正在寻找的页面可能已被删除、名称已更改或暂时不可用。

- 回到首页 -
-
- - diff --git a/apps/infra/net/nginx/helmchart.yaml b/apps/infra/net/nginx/helmchart.yaml index cf279b1..ee50230 100644 --- a/apps/infra/net/nginx/helmchart.yaml +++ b/apps/infra/net/nginx/helmchart.yaml @@ -101,9 +101,6 @@ spec: extraArgs: default-ssl-certificate: "infra-net/dev-cm-crt" # crowdsec插件配置 - extraVolumes: - - name: crowdsec-bouncer-plugin - emptyDir: {} extraInitContainers: - name: init-clone-crowdsec-bouncer image: devcm/lua-bouncer-plugin @@ -127,23 +124,24 @@ spec: volumeMounts: - name: crowdsec-bouncer-plugin mountPath: /lua_plugins - extraVolumeMounts: - - name: crowdsec-bouncer-plugin - mountPath: /etc/nginx/lua/plugins/crowdsec - subPath: crowdsec - defaultBackend: - enabled: true - image: - registry: registry.k8s.io - image: ingress-nginx/custom-error-pages - tag: v1.0.1 extraVolumes: + - name: crowdsec-bouncer-plugin + emptyDir: {} - name: custom-html configMap: name: custom-html extraVolumeMounts: + - name: crowdsec-bouncer-plugin + mountPath: /etc/nginx/lua/plugins/crowdsec + subPath: crowdsec - name: custom-html - mountPath: /www + mountPath: /etc/nginx/lua/plugins/crowdsec/templates + defaultBackend: + enabled: true + image: + registry: docker.io + image: devcm/default-backend + tag: latest # 和controller部署同一节点 nodeSelector: svccontroller.k3s.cattle.io/enablelb: "true"