Skip to content

Commit

Permalink
Merge pull request #145 from HSLdevcom/waltti-next-ui-api
Browse files Browse the repository at this point in the history
Waltti next UI api
  • Loading branch information
vesameskanen committed Dec 10, 2020
2 parents 96a2b3f + 1ff0140 commit b2ffe1b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/dev-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,7 @@ on:
branches:
- master
jobs:
install:
runs-on: ubuntu-18.04
strategy:
matrix:
node-version: [10.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn
test:
needs: install
runs-on: ubuntu-18.04
strategy:
matrix:
Expand All @@ -39,11 +19,6 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn
- name: Run tests
Expand Down
9 changes: 9 additions & 0 deletions common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,15 @@ location /ui/v1/hsl-next/ {
# 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-next: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 /timetables/v1/hsl/ {
rewrite /timetables/v1/hsl/(.*) /hsl/$1 break;
proxy_pass http://hsl-timetable-container:8080;
Expand Down
1 change: 1 addition & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,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','/ui/v1/waltti-next/sw.js','digitransit-ui-waltti-next:8080');
testProxying('api.digitransit.fi','/timetables/v1/hsl/stops/1010105.pdf','hsl-timetable-container:8080');
});

Expand Down

0 comments on commit b2ffe1b

Please sign in to comment.