diff --git a/apps/apps/halo/ingress-static.yaml b/apps/apps/halo/ingress-static.yaml
index 1adb9fd..c3099a5 100644
--- a/apps/apps/halo/ingress-static.yaml
+++ b/apps/apps/halo/ingress-static.yaml
@@ -28,29 +28,3 @@ spec:
name: halo
port:
number: 80
-
----
-apiVersion: networking.k8s.io/v1
-kind: Ingress
-metadata:
- name: halo-static-cdn
- namespace: apps
- annotations:
- nginx.ingress.kubernetes.io/use-regex: "true"
- nginx.ingress.kubernetes.io/rewrite-target: /$2
- # 添加允许跨域请求
- nginx.ingress.kubernetes.io/enable-cors: "true"
- nginx.ingress.kubernetes.io/cors-allow-origin: "https://dev.cm, https://*.dev.cm, https://fillcode.cm, https://*.fillcode.cm"
-spec:
- ingressClassName: nginx
- rules:
- - host: cdn.fillcode.com
- http:
- paths:
- - path: /dev-cm(/|$)(.*)
- pathType: ImplementationSpecific
- backend:
- service:
- name: halo
- port:
- number: 80
diff --git a/apps/infra/net/nginx/captcha.html b/apps/infra/net/nginx/captcha.html
deleted file mode 100644
index f010b3c..0000000
--- a/apps/infra/net/nginx/captcha.html
+++ /dev/null
@@ -1,301 +0,0 @@
-
-
-
-
-
- 出于安全原因 请完成验证
-
-
-
-
-
-
-
-
-
FillCode
-
-
请完成验证
-
请完成下面验证, 页面将会自动跳转到访问页面。
-
-
联系我们
-
-
-
-
-
diff --git a/apps/infra/net/nginx/certificate-cdn.yaml b/apps/infra/net/nginx/certificate-cdn.yaml
deleted file mode 100644
index 53c0e5b..0000000
--- a/apps/infra/net/nginx/certificate-cdn.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-apiVersion: cert-manager.io/v1
-kind: Certificate
-metadata:
- name: cdn-crt
- namespace: infra-net
-spec:
- secretName: cdn-crt
- issuerRef:
- name: dnspod
- kind: ClusterIssuer
- group: cert-manager.io
- dnsNames:
- - "fillcode.com"
- - "*.fillcode.com"
- - "sinceai.com"
- - "*.sinceai.com"
- - "dev.cm"
- - "*.dev.cm"
diff --git a/apps/infra/net/nginx/configmap-static-update.sh b/apps/infra/net/nginx/configmap-static-update.sh
new file mode 100644
index 0000000..f1544a9
--- /dev/null
+++ b/apps/infra/net/nginx/configmap-static-update.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# 更新 ConfigMap 中的静态文件
+cat > configmap-static.yaml << 'EOF'
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: static
+ namespace: infra-net
+data:
+EOF
+
+# 直接遍历 static 目录并追加到文件
+for file in static/*; do
+ filename=$(basename "$file")
+ echo " $filename: |" >> configmap-static.yaml
+ sed 's/^/ /' "$file" >> configmap-static.yaml
+ echo "" >> configmap-static.yaml
+done
+
+echo "ConfigMap updated successfully!"
diff --git a/apps/infra/net/nginx/configmap-html.yaml b/apps/infra/net/nginx/configmap-static.yaml
similarity index 60%
rename from apps/infra/net/nginx/configmap-html.yaml
rename to apps/infra/net/nginx/configmap-static.yaml
index 770541d..26a7c6b 100644
--- a/apps/infra/net/nginx/configmap-html.yaml
+++ b/apps/infra/net/nginx/configmap-static.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: custom-html
+ name: static
namespace: infra-net
data:
captcha.html: |
@@ -17,17 +17,17 @@ data:
-webkit-box-sizing: border-box;
box-sizing: border-box
}
-
+
body {
padding: 0;
margin: 0
}
-
+
#error {
position: relative;
height: 100vh
}
-
+
#error .error {
position: absolute;
left: 50%;
@@ -36,7 +36,7 @@ data:
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%)
}
-
+
#error .error-bg {
position: absolute;
left: 0;
@@ -45,7 +45,7 @@ data:
bottom: 0;
overflow: hidden
}
-
+
#error .error-bg > div {
position: absolute;
top: 0;
@@ -53,23 +53,23 @@ data:
width: 1px;
background-color: #eee
}
-
+
#error .error-bg > div:nth-child(1) {
left: 20%
}
-
+
#error .error-bg > div:nth-child(2) {
left: 40%
}
-
+
#error .error-bg > div:nth-child(3) {
left: 60%
}
-
+
#error .error-bg > div:nth-child(4) {
left: 80%
}
-
+
#error .error-bg > div:after {
content: '';
position: absolute;
@@ -82,71 +82,71 @@ data:
width: 2px;
background-color: #1cfafe
}
-
+
@-webkit-keyframes drop {
90% {
height: 20px
}
-
+
100% {
height: 160px;
-webkit-transform: translateY(calc(100vh + 160px));
transform: translateY(calc(100vh + 160px))
}
}
-
+
@keyframes drop {
90% {
height: 20px
}
-
+
100% {
height: 160px;
-webkit-transform: translateY(calc(100vh + 160px));
transform: translateY(calc(100vh + 160px))
}
}
-
+
#error .error-bg > div:nth-child(1):after {
-webkit-animation: drop 3s infinite linear;
animation: drop 3s infinite linear;
-webkit-animation-delay: .2s;
animation-delay: .2s
}
-
+
#error .error-bg > div:nth-child(2):after {
-webkit-animation: drop 2s infinite linear;
animation: drop 2s infinite linear;
-webkit-animation-delay: .7s;
animation-delay: .7s
}
-
+
#error .error-bg > div:nth-child(3):after {
-webkit-animation: drop 3s infinite linear;
animation: drop 3s infinite linear;
-webkit-animation-delay: .9s;
animation-delay: .9s
}
-
+
#error .error-bg > div:nth-child(4):after {
-webkit-animation: drop 2s infinite linear;
animation: drop 2s infinite linear;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s
}
-
+
.error {
max-width: 520px;
width: 100%;
padding: 20px;
text-align: center
}
-
+
.error .error-code {
height: 210px;
line-height: 210px
}
-
+
.error .error-code h1 {
font-family: oswald, sans-serif;
font-size: 80px;
@@ -154,7 +154,7 @@ data:
margin: 0;
text-shadow: 4px 4px 0 #1cfafe
}
-
+
.error h2 {
font-family: oswald, sans-serif;
font-size: 42px;
@@ -163,7 +163,7 @@ data:
text-transform: uppercase;
letter-spacing: 1.6px
}
-
+
.error p {
font-family: lato, sans-serif;
color: #000;
@@ -171,7 +171,7 @@ data:
margin-top: 20px;
margin-bottom: 25px
}
-
+
.error a {
font-family: lato, sans-serif;
padding: 10px 30px;
@@ -185,17 +185,17 @@ data:
-webkit-transition: .2s all;
transition: .2s all
}
-
+
.error a:not(:first-of-type) {
margin-left: 20px
}
-
+
.error a:hover {
background-color: #1cfafe;
-webkit-box-shadow: 0 0 0 0 #000, 0 0 0 2px #1cfafe;
box-shadow: 0 0 0 0 #000, 0 0 0 2px #1cfafe
}
-
+
.error-social > a {
width: 40px;
height: 40px;
@@ -203,13 +203,13 @@ data:
padding: 0;
margin: 0 5px
}
-
+
.error-social > a:hover {
background-color: #1cfafe;
-webkit-box-shadow: 0 0 0 0 #000, 0 0 0 2px #1cfafe;
box-shadow: 0 0 0 0 #000, 0 0 0 2px #1cfafe
}
-
+
#captcha-form {
position: relative;
width: 300px;
@@ -220,7 +220,7 @@ data:
-webkit-box-shadow: 0 0 0 2px #000, 2px 2px 0 2px #1cfafe;
box-shadow: 0 0 0 2px #000, 2px 2px 0 2px #1cfafe;
}
-
+
.loading {
position: absolute;
top: 0;
@@ -233,11 +233,11 @@ data:
height: 65px;
gap: 10px;
}
-
+
.loading:has(+ *) {
display: none;
}
-
+
.loading::before {
content: "";
width: 20px;
@@ -247,12 +247,12 @@ data:
border-radius: 50%;
animation: spin 1s linear infinite;
}
-
+
#captcha {
position: relative;
z-index: 2;
}
-
+
@keyframes spin {
from {
transform: rotate(0deg);
@@ -261,17 +261,17 @@ data:
transform: rotate(360deg);
}
}
-
+
@media only screen and (max-width: 480px) {
.error .error-code {
height: 122px;
line-height: 122px
}
-
+
.error .error-code h1 {
font-size: 60px
}
-
+
.error h2 {
font-size: 26px
}
@@ -293,7 +293,8 @@ data:
请完成验证
请完成下面验证, 页面将会自动跳转到访问页面。
联系我们
@@ -307,5 +308,163 @@ data: