Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DT-6155: updated for oulu new url link #244

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ http {
dev-lahti.digitransit.fi next-dev-lahti.digitransit.fi lahti.digitransit.fi
dev-lappeenranta.digitransit.fi next-dev-lappeenranta.digitransit.fi lappeenranta.digitransit.fi
dev-mikkeli.digitransit.fi next-dev-mikkeli.digitransit.fi mikkeli.digitransit.fi
dev-oulu.digitransit.fi next-dev-oulu.digitransit.fi oulu.digitransit.fi reittiopas.osl.fi
dev-oulu.digitransit.fi next-dev-oulu.digitransit.fi reittiopas.osl.fi
dev-turku.digitransit.fi next-dev-turku.digitransit.fi turku.digitransit.fi reittiopas.foli.fi
dev-tampere.digitransit.fi next-dev-tampere.digitransit.fi tampere.digitransit.fi repa.tampere.fi reittiopas.tampere.fi
dev-kouvola.digitransit.fi next-dev-kouvola.digitransit.fi kouvola.digitransit.fi
Expand Down Expand Up @@ -393,6 +393,40 @@ http {
}
}

server {
server_name oulu.digitransit.fi;
listen 8080;

# Prevent search engines from indexing the site
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";

location = /sw.js {
proxy_pass https://serviceworker.blob.core.windows.net/serviceworker/destroy-sw.js;
proxy_set_header Host serviceworker.blob.core.windows.net;
proxy_cache common;
proxy_cache_valid 200 5m;
proxy_cache_lock on;
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 = /appcache/manifest.appcache {
proxy_pass https://serviceworker.blob.core.windows.net/appcache/destroy-manifest.appcache;
default_type text/cache-manifest;
proxy_set_header Host serviceworker.blob.core.windows.net;
proxy_cache common;
proxy_cache_valid 200 5m;
proxy_cache_lock on;
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 / {
return 301 https://reittiopas.osl.fi$request_uri;
}
}

server {
server_name digitransit.fi www.digitransit.fi dev-site.digitransit.fi;
listen 8080;
Expand Down
5 changes: 4 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('matka ui', function() {
describe('waltti ui', function() {
const walttiCities = [
'hameenlinna', 'joensuu', 'jyvaskyla', 'kotka', 'kuopio', 'lahti', 'lappeenranta',
'mikkeli', 'oulu', 'turku', 'tampere','kouvola', 'rovaniemi','vaasa'
'mikkeli', 'turku', 'tampere','kouvola', 'rovaniemi','vaasa'
];

walttiCities.forEach(function(city) {
Expand All @@ -230,6 +230,9 @@ describe('waltti ui', function() {
testProxying('reittiopas.tampere.fi','/','digitransit-ui-waltti-v3:8080', true);
testCaching('reittiopas.tampere.fi','/sw.js', true);

testRedirect('oulu.digitransit.fi','/kissa','https://reittiopas.osl.fi/kissa');
testProxying('reittiopas.osl.fi','/','digitransit-ui-waltti-v3:8080', true);

testRedirect('opas.waltti.fi','/kissa','https://opas.waltti.fi/kissa');
testProxying('opas.waltti.fi','/','digitransit-ui-waltti-v3:8080', true);

Expand Down