diff --git a/apps/apps/halo/helmchart.yaml b/apps/apps/halo/helmchart.yaml index ea783f4..46af50f 100644 --- a/apps/apps/halo/helmchart.yaml +++ b/apps/apps/halo/helmchart.yaml @@ -7,7 +7,7 @@ spec: repo: https://halo-sigs.github.io/charts/ chart: halo targetNamespace: apps - version: 1.1.0 + version: 1.2.0 valuesContent: |- affinity: podAffinity: @@ -31,7 +31,7 @@ spec: - greenhk image: repository: halohub/halo-pro - tag: 2.18.0 + tag: 2.19.0 mysql: enabled: false postgresql: @@ -50,12 +50,16 @@ spec: ingressClassName: nginx annotations: nginx.ingress.kubernetes.io/proxy-body-size: "50m" + nginx.ingress.kubernetes.io/configuration-snippet: | + proxy_set_header Accept-Encoding ""; + subs_filter_types text/html; + subs_filter '<(script|img|link)([^>]*) (src|href)="/' '<$1$2 $3="https://static.fillcode.com/dev-cm/' ri; + subs_filter 'url\(\/' 'url(https://static.fillcode.com/dev-cm/' ri; + subs_filter 'Halo' 'FillCode' r; hostname: dev.cm path: / pathType: Prefix haloUsername: rohow - extraEnvVars: - - name: HALO_EXTERNAL_URL - value: https://dev.cm - + haloExternalUrl: https://dev.cm + diff --git a/apps/apps/halo/ingress-static.yaml b/apps/apps/halo/ingress-static.yaml index c3099a5..92d9169 100644 --- a/apps/apps/halo/ingress-static.yaml +++ b/apps/apps/halo/ingress-static.yaml @@ -28,3 +28,26 @@ 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 +spec: + ingressClassName: nginx + rules: + - host: static.fillcode.com + http: + paths: + - path: /dev-cm(/|$)(.*) + pathType: ImplementationSpecific + backend: + service: + name: halo + port: + number: 80 diff --git a/apps/infra/net/nginx/helmchart.yaml b/apps/infra/net/nginx/helmchart.yaml index 803e742..6cc9edb 100644 --- a/apps/infra/net/nginx/helmchart.yaml +++ b/apps/infra/net/nginx/helmchart.yaml @@ -30,6 +30,8 @@ spec: config: use-forwarded-headers: "true" allow-snippet-annotations: "true" + # http to https重定向 + ssl-redirect: "true" # 自定义错误页面 custom-http-errors: "404,503" # 缓存配置