From 118a1c431a6d56afd06e5dcf2d7a423d7cc863cf Mon Sep 17 00:00:00 2001 From: "AB from home.homenet" Date: Sun, 12 Oct 2025 14:13:05 +0300 Subject: [PATCH] Fix: Changed syncthing access and auth scheme --- k8s/apps/syncthing/cors-middleware.yaml | 18 ++++++++++++++++++ k8s/apps/syncthing/kustomization.yaml | 1 + k8s/apps/syncthing/traefik-simple.yaml | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 k8s/apps/syncthing/cors-middleware.yaml diff --git a/k8s/apps/syncthing/cors-middleware.yaml b/k8s/apps/syncthing/cors-middleware.yaml new file mode 100644 index 0000000..9bab4c0 --- /dev/null +++ b/k8s/apps/syncthing/cors-middleware.yaml @@ -0,0 +1,18 @@ +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: cors-headers + namespace: syncthing +spec: + headers: + accessControlAllowMethods: + - "GET" + - "OPTIONS" + - "POST" + accessControlAllowHeaders: + - "*" + accessControlAllowOriginList: + - "https://ss.hexor.cy" + - "https://idm.hexor.cy" + accessControlMaxAge: 100 + addVaryHeader: true \ No newline at end of file diff --git a/k8s/apps/syncthing/kustomization.yaml b/k8s/apps/syncthing/kustomization.yaml index 3b2e879..63c8032 100644 --- a/k8s/apps/syncthing/kustomization.yaml +++ b/k8s/apps/syncthing/kustomization.yaml @@ -6,6 +6,7 @@ resources: - app.yaml - nginx-router.yaml - traefik-simple.yaml + - cors-middleware.yaml helmCharts: - name: syncthing diff --git a/k8s/apps/syncthing/traefik-simple.yaml b/k8s/apps/syncthing/traefik-simple.yaml index 4795934..13b27f8 100644 --- a/k8s/apps/syncthing/traefik-simple.yaml +++ b/k8s/apps/syncthing/traefik-simple.yaml @@ -16,6 +16,8 @@ spec: middlewares: - name: authentik-forward-auth namespace: syncthing + - name: cors-headers + namespace: syncthing tls: secretName: syncthing-tls ---