Skip to content

Commit 459a3ed

Browse files
committed
Bruker redirects istedenfor rewrites
1 parent fb64117 commit 459a3ed

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

next.config.js

+10-9
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,16 @@ const config = {
213213
destination: `${process.env.APP_ORIGIN}/no/nav-og-samfunn/samarbeid/for-kommunen/digisos/til-kommuner-som-onsker-a-ta-i-bruk-digital-soknad-om-okonomisk-sosialhjelp/Håndbok for innføring av digital søknad %2800B%29 12.12.19.pdf`,
214214
permanent: false,
215215
},
216+
// /_/* should point to XP services. Redirect only if XP is on a different origin
217+
...(process.env.XP_ORIGIN !== process.env.APP_ORIGIN
218+
? [
219+
{
220+
source: '/_/:path*',
221+
destination: `${process.env.XP_ORIGIN}/_/:path*`,
222+
permanent: false,
223+
},
224+
]
225+
: []),
216226
],
217227
rewrites: async () => [
218228
{
@@ -249,15 +259,6 @@ const config = {
249259
source: '/feilside',
250260
destination: '/404',
251261
},
252-
// /_/* should point to XP services. Rewrite only if XP is on a different origin
253-
...(process.env.XP_ORIGIN !== process.env.APP_ORIGIN
254-
? [
255-
{
256-
source: '/_/:path*',
257-
destination: `${process.env.XP_ORIGIN}/_/:path*`,
258-
},
259-
]
260-
: []),
261262
...(isLocal
262263
? [
263264
{

0 commit comments

Comments
 (0)