From 30308740ddfb8fb6e6042745c41327f9b6ea5a60 Mon Sep 17 00:00:00 2001 From: stefan Date: Sat, 14 Mar 2026 16:06:53 +0100 Subject: [PATCH] Upgrade Caddy to v2.11 and enforce HTTPS for API and Keycloak URLs. --- dc-gui.yaml | 2 +- .../shells/meldestelle-portal/src/jsMain/resources/index.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dc-gui.yaml b/dc-gui.yaml index 40645f3b..75ee6270 100644 --- a/dc-gui.yaml +++ b/dc-gui.yaml @@ -13,7 +13,7 @@ services: dockerfile: config/docker/caddy/web-app/Dockerfile args: # Frontend spezifisch: - CADDY_VERSION: "${DOCKER_CADDY_VERSION:-2.9-alpine}" + CADDY_VERSION: "${DOCKER_CADDY_VERSION:-2.11-alpine}" # Metadaten: VERSION: "${DOCKER_VERSION:-1.0.0-SNAPSHOT}" BUILD_DATE: "${DOCKER_BUILD_DATE}" diff --git a/frontend/shells/meldestelle-portal/src/jsMain/resources/index.html b/frontend/shells/meldestelle-portal/src/jsMain/resources/index.html index e938bc6d..fd5c423f 100644 --- a/frontend/shells/meldestelle-portal/src/jsMain/resources/index.html +++ b/frontend/shells/meldestelle-portal/src/jsMain/resources/index.html @@ -27,7 +27,7 @@ ? apiOverride.replace(/\/$/, '') : (apiFromCaddy && !apiFromCaddy.startsWith('{{') ? apiFromCaddy.replace(/\/$/, '') - : window.location.origin.replace(/\/$/, '')); + : 'https://' + window.location.origin.replace(/\/$/, '')); // Caddy injiziert: {{.Env.KEYCLOAK_URL}} → z.B. "https://auth.mo-code.at" const kcFromCaddy = '{{.Env.KEYCLOAK_URL}}'; @@ -36,7 +36,7 @@ ? kcOverride.replace(/\/$/, '') : (kcFromCaddy && !kcFromCaddy.startsWith('{{') ? kcFromCaddy.replace(/\/$/, '') - : 'http://' + window.location.hostname + ':8180'); + : 'https://' + window.location.hostname + ':8180'); } catch (e) { globalThis.API_BASE_URL = 'http://localhost:8081';