diff --git a/package.json b/package.json index 2ffe5617c0..e0a036c2ef 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@popperjs/core": "2.11.8", "@sentry/browser": "7.77.0", "@storybook/testing-react": "2.0.1", - "axios": "0.27.2", + "axios": "1.6.1", "core-js": "3.33.2", "date-fns": "2.30.0", "date-fns-tz": "2.0.0", diff --git a/packages/behandling-opplaeringspenger/package.json b/packages/behandling-opplaeringspenger/package.json index 1bc406ac5e..97f5a4a662 100644 --- a/packages/behandling-opplaeringspenger/package.json +++ b/packages/behandling-opplaeringspenger/package.json @@ -37,7 +37,7 @@ "@navikt/ft-fakta-beregning-redesign": "1.0.12", "@navikt/ft-fakta-fordel-beregningsgrunnlag": "7.3.13", "@navikt/ft-prosess-beregningsgrunnlag": "6.3.15", - "axios": "0.27.2", + "axios": "1.6.1", "nav-frontend-alertstriper": "4.0.2", "react": "18.2.0", "react-intl": "6.5.2", diff --git a/packages/behandling-pleiepenger-sluttfase/package.json b/packages/behandling-pleiepenger-sluttfase/package.json index d095070d1a..bd42027486 100644 --- a/packages/behandling-pleiepenger-sluttfase/package.json +++ b/packages/behandling-pleiepenger-sluttfase/package.json @@ -36,7 +36,7 @@ "@navikt/ft-fakta-beregning-redesign": "1.0.12", "@navikt/ft-fakta-fordel-beregningsgrunnlag": "7.3.13", "@navikt/ft-prosess-beregningsgrunnlag": "6.3.15", - "axios": "0.27.2", + "axios": "1.6.1", "nav-frontend-alertstriper": "4.0.2", "react": "18.2.0", "react-intl": "6.5.2", diff --git a/packages/behandling-pleiepenger/package.json b/packages/behandling-pleiepenger/package.json index caca01f37f..cc66401b41 100644 --- a/packages/behandling-pleiepenger/package.json +++ b/packages/behandling-pleiepenger/package.json @@ -37,7 +37,7 @@ "@navikt/ft-fakta-beregning-redesign": "1.0.12", "@navikt/ft-fakta-fordel-beregningsgrunnlag": "7.3.13", "@navikt/ft-prosess-beregningsgrunnlag": "6.3.15", - "axios": "0.27.2", + "axios": "1.6.1", "nav-frontend-alertstriper": "4.0.2", "react": "18.2.0", "react-intl": "6.5.2", diff --git a/packages/rest-api/package.json b/packages/rest-api/package.json index 15e624e360..f67aa6ca5b 100644 --- a/packages/rest-api/package.json +++ b/packages/rest-api/package.json @@ -6,7 +6,7 @@ "private": true, "dependencies": { "@sentry/browser": "7.77.0", - "axios": "0.27.2", + "axios": "1.6.1", "node-cache": "5.1.2" } } diff --git a/packages/rest-api/src/axios/axiosEtag.ts b/packages/rest-api/src/axios/axiosEtag.ts index 83121e64b8..ef1265f2c2 100644 --- a/packages/rest-api/src/axios/axiosEtag.ts +++ b/packages/rest-api/src/axios/axiosEtag.ts @@ -26,7 +26,7 @@ SOFTWARE. */ -import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'; +import axios, { AxiosError, AxiosHeaders, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios'; import NodeCache from 'node-cache'; @@ -80,13 +80,13 @@ function getCacheByAxiosConfig(config: AxiosRequestConfig) { return EtagCache.get(getUUIDByAxiosConfig(config)); } -function requestInterceptor(config: AxiosRequestConfig) { +function requestInterceptor(config: InternalAxiosRequestConfig) { if (isCacheableMethod(config)) { const uuid = getUUIDByAxiosConfig(config); const lastCachedResult = EtagCache.get(uuid); if (lastCachedResult) { // eslint-disable-next-line no-param-reassign - config.headers = { ...config.headers, 'If-None-Match': lastCachedResult.etag }; + config.headers = new AxiosHeaders({ ...config.headers, 'If-None-Match': lastCachedResult.etag }); } } return config; diff --git a/packages/sak-app/package.json b/packages/sak-app/package.json index 6df39e3610..19808dadaf 100644 --- a/packages/sak-app/package.json +++ b/packages/sak-app/package.json @@ -57,7 +57,7 @@ "@navikt/ft-prosess-beregningsgrunnlag": "6.3.15", "@navikt/ft-ui-komponenter": "2.1.13", "@sentry/browser": "7.77.0", - "axios": "0.27.2", + "axios": "1.6.1", "classnames": "2.3.2", "history": "5.3.0", "moment": "2.29.4", diff --git a/packages/shared-components/package.json b/packages/shared-components/package.json index f2d4de3225..b3f9e6aeec 100644 --- a/packages/shared-components/package.json +++ b/packages/shared-components/package.json @@ -15,7 +15,7 @@ "@navikt/ds-react": "5.10.0", "@navikt/fnrvalidator": "1.3.3", "@navikt/ft-plattform-komponenter": "2.3.9", - "axios": "0.27.2", + "axios": "1.6.1", "classnames": "2.3.2", "date-fns": "2.30.0", "date-fns-tz": "2.0.0", diff --git a/yarn.lock b/yarn.lock index b62ad9bc31..dc26c5c0b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4030,7 +4030,7 @@ __metadata: "@navikt/ds-react": 5.10.0 "@navikt/fnrvalidator": 1.3.3 "@navikt/ft-plattform-komponenter": 2.3.9 - axios: 0.27.2 + axios: 1.6.1 classnames: 2.3.2 date-fns: 2.30.0 date-fns-tz: 2.0.0 @@ -4769,7 +4769,7 @@ __metadata: "@navikt/ft-fakta-beregning-redesign": 1.0.12 "@navikt/ft-fakta-fordel-beregningsgrunnlag": 7.3.13 "@navikt/ft-prosess-beregningsgrunnlag": 6.3.15 - axios: 0.27.2 + axios: 1.6.1 axios-mock-adapter: 1.22.0 enzyme: 3.11.0 nav-frontend-alertstriper: 4.0.2 @@ -4819,7 +4819,7 @@ __metadata: "@navikt/ft-fakta-beregning-redesign": 1.0.12 "@navikt/ft-fakta-fordel-beregningsgrunnlag": 7.3.13 "@navikt/ft-prosess-beregningsgrunnlag": 6.3.15 - axios: 0.27.2 + axios: 1.6.1 axios-mock-adapter: 1.22.0 enzyme: 3.11.0 nav-frontend-alertstriper: 4.0.2 @@ -4871,7 +4871,7 @@ __metadata: "@navikt/ft-fakta-beregning-redesign": 1.0.12 "@navikt/ft-fakta-fordel-beregningsgrunnlag": 7.3.13 "@navikt/ft-prosess-beregningsgrunnlag": 6.3.15 - axios: 0.27.2 + axios: 1.6.1 axios-mock-adapter: 1.22.0 enzyme: 3.11.0 nav-frontend-alertstriper: 4.0.2 @@ -5424,7 +5424,7 @@ __metadata: resolution: "@k9-sak-web/rest-api@workspace:packages/rest-api" dependencies: "@sentry/browser": 7.77.0 - axios: 0.27.2 + axios: 1.6.1 node-cache: 5.1.2 languageName: unknown linkType: soft @@ -5504,7 +5504,7 @@ __metadata: "@navikt/ft-prosess-beregningsgrunnlag": 6.3.15 "@navikt/ft-ui-komponenter": 2.1.13 "@sentry/browser": 7.77.0 - axios: 0.27.2 + axios: 1.6.1 classnames: 2.3.2 history: 5.3.0 moment: 2.29.4 @@ -11121,13 +11121,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:0.27.2": - version: 0.27.2 - resolution: "axios@npm:0.27.2" +"axios@npm:1.6.1": + version: 1.6.1 + resolution: "axios@npm:1.6.1" dependencies: - follow-redirects: ^1.14.9 + follow-redirects: ^1.15.0 form-data: ^4.0.0 - checksum: 38cb7540465fe8c4102850c4368053c21683af85c5fdf0ea619f9628abbcb59415d1e22ebc8a6390d2bbc9b58a9806c874f139767389c862ec9b772235f06854 + proxy-from-env: ^1.1.0 + checksum: 573f03f59b7487d54551b16f5e155d1d130ad4864ed32d1da93d522b78a57123b34e3bde37f822a65ee297e79f1db840f9ad6514addff50d3cbf5caeed39e8dc languageName: node linkType: hard @@ -15186,7 +15187,7 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.0": +"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.15.0": version: 1.15.2 resolution: "follow-redirects@npm:1.15.2" peerDependenciesMeta: @@ -18212,7 +18213,7 @@ __metadata: "@typescript-eslint/parser": 6.9.1 "@wojtekmaj/enzyme-adapter-react-17": 0.8.0 autoprefixer: ^10.4.16 - axios: 0.27.2 + axios: 1.6.1 axios-mock-adapter: 1.22.0 babel-jest: 29.7.0 babel-loader: 9.1.3