Skip to content

Commit

Permalink
Merge pull request #64 from HSLdevcom/DT-2663
Browse files Browse the repository at this point in the history
DT-2663 proxy configuration
  • Loading branch information
optionsome authored Jul 13, 2018
2 parents 928337a + 60ba8ab commit 6ed2dd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,12 @@ location /ui/v1/hsl-next/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
}

location /timetables/v1/hsl/ {
rewrite /timetables/v1/hsl/(.*) /hsl/$1 break;
proxy_pass http://hsl-timetable-container: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;
}
1 change: 1 addition & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ describe('api.digitransit.fi', function() {
testProxying('api.digitransit.fi','/ui/v1/waltti/sw.js','digitransit-ui-waltti:8080');
testProxying('api.digitransit.fi','/ui/v1/hsl/sw.js','digitransit-ui-hsl:8080');
testProxying('api.digitransit.fi','/ui/v1/hsl-next/sw.js','digitransit-ui-hsl-next:8080');
testProxying('api.digitransit.fi','/timetables/v1/hsl/stops/1010105.pdf','hsl-timetable-container:8080');
});

describe('hsl ui', function() {
Expand Down

0 comments on commit 6ed2dd8

Please sign in to comment.