Skip to content

Commit

Permalink
Merge pull request #1665 from navikt/graceful_proxy
Browse files Browse the repository at this point in the history
bump http-proxy-middleware til 3.0.0-beta.1 fro graceful shutdown av proxy
  • Loading branch information
kenglxn authored Sep 1, 2023
2 parents 9305a8f + ab91d3c commit 6d12379
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 117 deletions.
2 changes: 0 additions & 2 deletions nais/dev-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ spec:
env:
- name: NODE_EXTRA_CA_CERTS
value: /etc/ssl/ca-bundle.pem
- name: BACKEND_API_URL
value: http://min-side-arbeidsgiver-api.fager
- name: LOGIN_URL
value: https://arbeidsgiver.intern.dev.nav.no/min-side-arbeidsgiver/oauth2/login
- name: PROXY_LOG_LEVEL
Expand Down
2 changes: 0 additions & 2 deletions nais/labs-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ spec:
env:
- name: NODE_EXTRA_CA_CERTS
value: /etc/ssl/ca-bundle.pem
- name: BACKEND_API_URL
value: http://demo-min-side-arbeidsgiver-api.fager
- name: LOGIN_URL
value: https://arbeidsgiver.ekstern.dev.nav.no/fake-login/login?issuer=selvbetjening&sub=123456789&domain=arbeidsgiver.ekstern.dev.nav.no&redirect=https://arbeidsgiver.ekstern.dev.nav.no/min-side-arbeidsgiver/
- name: PROXY_LOG_LEVEL
Expand Down
2 changes: 0 additions & 2 deletions nais/prod-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ spec:
env:
- name: NODE_EXTRA_CA_CERTS
value: /etc/ssl/ca-bundle.pem
- name: BACKEND_API_URL
value: http://min-side-arbeidsgiver-api.fager
- name: LOGIN_URL
value: https://arbeidsgiver.nav.no/min-side-arbeidsgiver/oauth2/login
- name: PROXY_LOG_LEVEL
Expand Down
17 changes: 10 additions & 7 deletions server/mock/antallArbeidsforholdMock.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
export const mock = (app) => {
app.use('/min-side-arbeidsgiver/antall-arbeidsforhold', (req, res) => {
const antall = 502;
const missing = Math.floor(Math.random() * 10) === 0;
setTimeout(() => {
res.send({ first: '131488434', second: missing ? -1 : antall });
}, 1000);
});
app.use(
'/min-side-arbeidsgiver/arbeidsgiver-arbeidsforhold-api/antall-arbeidsforhold',
(req, res) => {
const antall = 502;
const missing = Math.floor(Math.random() * 10) === 0;
setTimeout(() => {
res.send({ first: '131488434', second: missing ? -1 : antall });
}, 1000);
}
);
};
106 changes: 72 additions & 34 deletions server/package-lock.json

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

2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cookie-parser": "^1.4.6",
"express": "^4.17.3",
"express-http-proxy": "1.6.3",
"http-proxy-middleware": "^1.0.6",
"http-proxy-middleware": "3.0.0-beta.1",
"jsdom": "^16.4.0",
"mustache": "^4.2.0",
"node-fetch": "^3.2.10",
Expand Down
Loading

0 comments on commit 6d12379

Please sign in to comment.