feat(cdn): cdn功能优化
这个提交包含在:
@@ -6,31 +6,39 @@ metadata:
|
||||
namespace: infra-net
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
nginx.ingress.kubernetes.io/rewrite-target: "/$3"
|
||||
# 重定向配置
|
||||
nginx.ingress.kubernetes.io/proxy-redirect-from: "/"
|
||||
nginx.ingress.kubernetes.io/proxy-redirect-to: "/$1/"
|
||||
# 添加允许跨域请求
|
||||
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"
|
||||
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
|
||||
nginx.ingress.kubernetes.io/proxy-cookie-domain: "~^(.+)$ cdn.fillcode.com"
|
||||
nginx.ingress.kubernetes.io/proxy-cookie-path: "~^/(.*)$ /$1"
|
||||
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||
more_set_headers "Set-Cookie $sent_http_set_cookie; SameSite=None; Secure";
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: cdn.fillcode.com
|
||||
http:
|
||||
paths:
|
||||
- path: /dev-cm(/|$)(.*)
|
||||
- path: /(dev-cm)(/|$)(.*)
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: cdn-halo
|
||||
port:
|
||||
number: 80
|
||||
- path: /git-dev-cm(/|$)(.*)
|
||||
- path: /(git-dev-cm)(/|$)(.*)
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: cdn-gitea-http
|
||||
port:
|
||||
number: 3000
|
||||
- path: /monitor-dev-cm(/|$)(.*)
|
||||
- path: /(monitor-dev-cm)(/|$)(.*)
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
|
||||
在新议题中引用
屏蔽一个用户