From e20e61b99b017a8aa35b9fa319ea528fb8028cd7 Mon Sep 17 00:00:00 2001 From: sharhio Date: Thu, 15 Jan 2026 12:45:28 +0200 Subject: [PATCH 1/2] point next-dev-matka to test --- common.conf | 8 ++++++++ nginx.conf | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/common.conf b/common.conf index d6beaa2..7f5f16f 100644 --- a/common.conf +++ b/common.conf @@ -453,6 +453,14 @@ location /ui/v3/hsl-test/ { # proxy_set_header X-Forwarded-Host $host; } +location /ui/v3/matka-test/ { + rewrite /ui/v3/matka-test/(.*) /$1 break; + proxy_pass http://digitransit-ui-matka-test:8080; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +} + location /waltti-assets/v1/ { rewrite /waltti-assets/v1/(.*)$ /tvv-lippu-ja-maksujarjestelma-oy/waltti-digitransit-config-data/main/$1 break; proxy_pass https://raw.githubusercontent.com; diff --git a/nginx.conf b/nginx.conf index b280fdc..fde7c73 100644 --- a/nginx.conf +++ b/nginx.conf @@ -147,7 +147,7 @@ http { } server { - server_name dev-matka.digitransit.fi next-dev-matka.digitransit.fi opas.matka.fi matka.fintraffic.fi + server_name dev-matka.digitransit.fi opas.matka.fi matka.fintraffic.fi dev-kelareitit.digitransit.fi kelareitit.digitransit.fi; listen 8080; @@ -187,6 +187,46 @@ http { } } + server { + server_name next-dev-matka.digitransit.fi; + listen 8080; + + if ($http_x_forwarded_proto != "https") { + return 301 https://$host$request_uri; + } + + # Add HTTP Strict Transport Security for good measure. + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains;"; + + error_page 500 502 503 504 /502.html; + location = /502.html { + proxy_pass https://errorpages.blob.core.windows.net/html/digitransit-error-page.html; + internal; + } + + location = /sw.js { + proxy_pass http://digitransit-ui-matka-test:8080; + include basicsettings.conf; + proxy_cache sw; + proxy_cache_valid 200 30s; + proxy_cache_lock on; + proxy_cache_key "$host$request_uri"; + add_header X-Proxy-Cache $upstream_cache_status; + proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie; + proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; + } + location = /haku { + add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; + proxy_hide_header X-Frame-Options; + proxy_pass http://digitransit-ui-matka-test:8080; + include basicsettings.conf; + } + location / { + proxy_pass http://digitransit-ui-matka-test:8080; + include basicsettings.conf; + } + } + server { server_name dev-hameenlinna.digitransit.fi hameenlinna.digitransit.fi reittiopas.hameenlinna.fi dev-joensuu.digitransit.fi joensuu.digitransit.fi From 3bc81134da030d57766c38c483dd46775140abbe Mon Sep 17 00:00:00 2001 From: sharhio Date: Thu, 15 Jan 2026 12:56:25 +0200 Subject: [PATCH 2/2] formatting --- nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index fde7c73..80beb3a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -187,7 +187,7 @@ http { } } - server { + server { server_name next-dev-matka.digitransit.fi; listen 8080;