Skip to content

Commit 28a57fc

Browse files
authored
Endre devserver port til 9005 for ung-sak-web. Rydd vekk k9 proxy paths (#6835)
Slik at det er samme port som den har i verdikjede. Fjerner k9 proxy paths som ikkje er tilgjengelege i verdikjede/Q miljø. Slik at det blir lettare å oppdage det som vil feile der.
1 parent 9bb9512 commit 28a57fc

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

ung.vite.config.js

+1-31
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,8 @@ export default ({ mode }) => {
5151
process.env = { ...process.env, ...loadEnv(mode, `${process.cwd()}/envDir`) };
5252
return defineConfig({
5353
server: {
54-
port: 9000,
54+
port: 9005,
5555
proxy: {
56-
'/k9/formidling/dokumentdata': createProxy(process.env.APP_URL_K9FORMIDLING_DD || 'http://localhost:8294'),
57-
'/k9/formidling': createProxy(process.env.APP_URL_K9FORMIDLING || 'http://localhost:8290'),
58-
'/k9/sak': {
59-
target: process.env.APP_URL_SAK || 'http://localhost:8080',
60-
changeOrigin: !!process.env.APP_URL_SAK,
61-
ws: false,
62-
secure: false,
63-
configure: proxy => {
64-
proxy.on('proxyRes', (proxyRes, req, res) => {
65-
if (proxyRes.headers.location && proxyRes.headers.location.startsWith(process.env.APP_URL_SAK)) {
66-
// eslint-disable-next-line no-param-reassign, prefer-destructuring
67-
proxyRes.headers.location = proxyRes.headers.location.split(process.env.APP_URL_SAK)[1];
68-
}
69-
if (proxyRes.statusCode === 401) {
70-
// eslint-disable-next-line no-param-reassign
71-
proxyRes.headers.location = '/ung/sak/resource/login';
72-
}
73-
});
74-
},
75-
},
7656
'/ung/sak': {
7757
target: process.env.APP_URL_UNG_SAK || 'http://localhost:8085',
7858
changeOrigin: !!process.env.APP_URL_UNG_SAK,
@@ -91,16 +71,6 @@ export default ({ mode }) => {
9171
});
9272
},
9373
},
94-
'/k9/oppdrag': createProxy(process.env.APP_URL_K9OPPDRAG || 'http://localhost:8070'),
95-
'/k9/klage': createProxy(process.env.APP_URL_KLAGE || 'http://localhost:8701'),
96-
'/k9/tilbake': createProxy(process.env.APP_URL_K9TILBAKE || 'http://localhost:8030'),
97-
'k9/endringslogg': createProxy(
98-
process.env.ENDRINGSLOGG_URL || 'https://familie-endringslogg.intern.dev.nav.no',
99-
{
100-
'^/k9/endringslogg': '',
101-
},
102-
),
103-
'/k9/feature-toggle/toggles.json': createMockResponder('http://localhost:8080', staticJsonResponse(featureTogglesFactory())),
10474
'/ung/feature-toggle/toggles.json': createMockResponder('http://localhost:8085', staticJsonResponse(featureTogglesFactory())),
10575
},
10676
},

0 commit comments

Comments
 (0)