From 4ea7c6dbd6cc2ae3a4b4691af03c1b4a0b65615c Mon Sep 17 00:00:00 2001 From: AI Assistant Date: Mon, 23 Mar 2026 15:49:37 +0200 Subject: [PATCH] fix(geoportal): use relative /tiles URL for Martin (avoids mixed content + build-time env) --- src/modules/geoportal/components/map-viewer.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/modules/geoportal/components/map-viewer.tsx b/src/modules/geoportal/components/map-viewer.tsx index 3df9cf3..401abc7 100644 --- a/src/modules/geoportal/components/map-viewer.tsx +++ b/src/modules/geoportal/components/map-viewer.tsx @@ -11,12 +11,10 @@ import type { ClickedFeature, LayerVisibility } from "../types"; /* ------------------------------------------------------------------ */ /** - * Martin tile URL. - * Env var NEXT_PUBLIC_MARTIN_URL should be set in docker-compose.yml: - * - NEXT_PUBLIC_MARTIN_URL=http://10.10.10.166:3010 - * For production via Traefik, use https://tools.beletage.ro/tiles + * Martin tile URL — use relative /tiles path (proxied by Traefik). + * This works both in production (HTTPS) and avoids mixed-content issues. */ -const DEFAULT_MARTIN_URL = process.env.NEXT_PUBLIC_MARTIN_URL ?? "http://10.10.10.166:3010"; +const DEFAULT_MARTIN_URL = "/tiles"; /** Default center: Romania roughly centered */ const DEFAULT_CENTER: [number, number] = [23.8, 46.1];