diff --git a/nginx.conf b/nginx.conf index 88911f3..04ad432 100644 --- a/nginx.conf +++ b/nginx.conf @@ -159,41 +159,6 @@ http { return 301 https://dev.digitransit.fi; } - server { - server_name dev-rovaniemi.digitransit.fi rovaniemi.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;"; - - location = /sw.js { - proxy_pass http://digitransit-ui-waltti: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; - 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 / { - proxy_pass http://digitransit-ui-waltti: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; - } - } - server { server_name dev-linjasto2021.digitransit.fi linjasto2021.digitransit.fi; listen 8080; @@ -216,7 +181,7 @@ http { next-dev-turku.digitransit.fi dev-turku.digitransit.fi turku.digitransit.fi reittiopas.foli.fi next-dev-tampere.digitransit.fi dev-tampere.digitransit.fi tampere.digitransit.fi repa.tampere.fi reittiopas.tampere.fi next-dev-kouvola.digitransit.fi dev-kouvola.digitransit.fi kouvola.digitransit.fi - next-dev-rovaniemi.digitransit.fi + next-dev-rovaniemi.digitransit.fi dev-rovaniemi.digitransit.fi rovaniemi.digitransit.fi next-dev-opas.waltti.fi dev-opas.waltti.fi opas.waltti.fi next-dev-vaasa.digitransit.fi dev-vaasa.digitransit.fi vaasa.digitransit.fi; listen 8080; diff --git a/test.js b/test.js index d981689..d6bfe9b 100644 --- a/test.js +++ b/test.js @@ -199,23 +199,12 @@ describe('matka ui', function() { }); describe('waltti ui', function() { - const legacyUICities = ['rovaniemi']; - - const newUICities = [ + const walttiCities = [ 'jyvaskyla', 'kuopio', 'mikkeli', 'turku', 'tampere', 'vaasa', 'hameenlinna', - 'joensuu', 'kotka', 'lahti', 'lappeenranta', 'kouvola','oulu' + 'joensuu', 'kotka', 'lahti', 'lappeenranta', 'kouvola','oulu', 'rovaniemi' ]; - legacyUICities.forEach(function(city) { - testRedirect('dev-'+city+'.digitransit.fi','/kissa','https://dev-'+city+'.digitransit.fi/kissa'); - testProxying('dev-'+city+'.digitransit.fi','/','digitransit-ui-waltti:8080', true); - testRedirect('next-dev-'+city+'.digitransit.fi','/kissa','https://next-dev-'+city+'.digitransit.fi/kissa'); - testProxying('next-dev-'+city+'.digitransit.fi','/','digitransit-ui-waltti-next:8080', true); - testRedirect(city+'.digitransit.fi','/kissa','https://'+city+'.digitransit.fi/kissa'); - testProxying(city+'.digitransit.fi','/','digitransit-ui-waltti:8080', true); - }); - - newUICities.forEach(function(city) { + walttiCities.forEach(function(city) { testRedirect('dev-'+city+'.digitransit.fi','/kissa','https://dev-'+city+'.digitransit.fi/kissa'); testProxying('dev-'+city+'.digitransit.fi','/','digitransit-ui-waltti-next:8080', true); testRedirect('next-dev-'+city+'.digitransit.fi','/kissa','https://next-dev-'+city+'.digitransit.fi/kissa');