Skip to content

Commit

Permalink
Merge pull request #61 from HSLdevcom/beta-redirect
Browse files Browse the repository at this point in the history
redirect from old matka domain
  • Loading branch information
vesameskanen authored May 21, 2018
2 parents 9af5232 + 238c6e1 commit 1b38164
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 8 additions & 1 deletion nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ http {
}

server {
server_name dev.digitransit.fi beta.digitransit.fi beta.matka.fi opas.matka.fi;
server_name dev.digitransit.fi beta.digitransit.fi opas.matka.fi;
listen 8080;

include legacy-redirects.conf;
Expand All @@ -118,6 +118,13 @@ http {
}
}

server {
server_name beta.matka.fi;
listen 8080;

return 301 https://www.liikennevirasto.fi/uutinen/-/asset_publisher/SHHdKcU2jahL/content/matka-fi-osoite-muuttuu;
}

server {
server_name dev-hameenlinna.digitransit.fi hameenlinna.digitransit.fi reittiopas.hameenlinna.fi
dev-joensuu.digitransit.fi joensuu.digitransit.fi
Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,7 @@ describe('hsl ui', function() {
describe('matka ui', function() {
testRedirect('www.opas.matka.fi','/kissa','http://opas.matka.fi/kissa');
testRedirect('opas.matka.fi','/kissa','https://opas.matka.fi/kissa');
testRedirect('www.beta.matka.fi','/kissa','http://beta.matka.fi/kissa');
testRedirect('beta.matka.fi','/kissa','https://beta.matka.fi/kissa');

testProxying('beta.matka.fi','/','digitransit-ui-default:8080', true);
testProxying('opas.matka.fi','/','digitransit-ui-default:8080', true);

it('https should not redirect', function(done) {
Expand Down

0 comments on commit 1b38164

Please sign in to comment.