From cbf93c78205c54979ae92edba08c96081ab26769 Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Mon, 30 Sep 2024 17:26:24 +0300 Subject: [PATCH 1/2] Remove unused ui apis --- common.conf | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/common.conf b/common.conf index 9a0d148..744fc9e 100644 --- a/common.conf +++ b/common.conf @@ -468,42 +468,6 @@ location /routing-data/v3/finland { include cors.conf; } -location /ui/v1/finland/ { - rewrite /ui/v1/finland/(.*) /$1 break; - proxy_pass http://digitransit-ui-matka-v2:8080; - proxy_redirect off; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # proxy_set_header X-Forwarded-Host $host; -} - -location /ui/v1/hsl-next/ { - rewrite /ui/v1/hsl-next/(.*) /$1 break; - proxy_pass http://digitransit-ui-hsl-v2:8080; - proxy_redirect off; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # proxy_set_header X-Forwarded-Host $host; -} - -location /ui/v1/waltti-next/ { - rewrite /ui/v1/waltti-next/(.*) /$1 break; - proxy_pass http://digitransit-ui-waltti-v2:8080; - proxy_redirect off; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # proxy_set_header X-Forwarded-Host $host; -} - -location /ui/v2/matka/ { - rewrite /ui/v2/matka/(.*) /$1 break; - proxy_pass http://digitransit-ui-matka-v2:8080; - proxy_redirect off; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # proxy_set_header X-Forwarded-Host $host; -} - location /ui/v2/hsl/ { rewrite /ui/v2/hsl/(.*) /$1 break; proxy_pass http://digitransit-ui-hsl-v2:8080; @@ -522,15 +486,6 @@ location /ui/v2-test/hsl/ { # proxy_set_header X-Forwarded-Host $host; } -location /ui/v2/waltti/ { - rewrite /ui/v2/waltti/(.*) /$1 break; - proxy_pass http://digitransit-ui-waltti-v2:8080; - proxy_redirect off; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # proxy_set_header X-Forwarded-Host $host; -} - location /ui/v3/matka/ { rewrite /ui/v3/matka/(.*) /$1 break; proxy_pass http://digitransit-ui-matka-v3:8080; From cb40b5f42bb1859ad34d9d918d819295acea4fba Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Wed, 9 Oct 2024 11:02:14 +0300 Subject: [PATCH 2/2] Remove hsl test ui --- common.conf | 9 --------- nginx.conf | 48 ------------------------------------------------ 2 files changed, 57 deletions(-) diff --git a/common.conf b/common.conf index 744fc9e..a42b434 100644 --- a/common.conf +++ b/common.conf @@ -477,15 +477,6 @@ location /ui/v2/hsl/ { # proxy_set_header X-Forwarded-Host $host; } -location /ui/v2-test/hsl/ { - rewrite /ui/v2-test/hsl/(.*) /$1 break; - proxy_pass http://digitransit-ui-hsl-v2-test:8080; - proxy_redirect off; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # proxy_set_header X-Forwarded-Host $host; -} - location /ui/v3/matka/ { rewrite /ui/v3/matka/(.*) /$1 break; proxy_pass http://digitransit-ui-matka-v3:8080; diff --git a/nginx.conf b/nginx.conf index 723b2c3..e89c497 100644 --- a/nginx.conf +++ b/nginx.conf @@ -345,54 +345,6 @@ http { } } - # test service for dedicated project (eg. for node-migration) - server { - server_name test.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/error_page.html; - internal; - } - - location = /sw.js { - proxy_pass http://digitransit-ui-hsl-v2-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 /local-storage-emitter { - proxy_hide_header X-Frame-Options; - proxy_pass http://digitransit-ui-hsl-v2-test:8080; - include basicsettings.conf; - } - location = /haku { - add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; - proxy_hide_header X-Frame-Options; - proxy_pass http://digitransit-ui-hsl-v2-test:8080; - include basicsettings.conf; - } - - location / { - proxy_pass http://digitransit-ui-hsl-v2-test:8080; - include basicsettings.conf; - } - } - server { server_name dev-matka-yleisviesti.digitransit.fi matka-yleisviesti.digitransit.fi; listen 8080;