Skip to content

Commit

Permalink
Oppdatere next config
Browse files Browse the repository at this point in the history
  • Loading branch information
nattaphongklinjan committed Nov 1, 2023
1 parent 208089a commit 6125e67
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 47 deletions.
80 changes: 39 additions & 41 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,43 @@ const myAppDirectives = {
"https://sentry.gc.nav.no/api/86/security/?sentry_key=98d1497555654049a7d46e29a5208e61",
};

module.exports = withPlugins([withTM], {
//withSentryConfig(
publicRuntimeConfig: {
amplitudeKey: process.env.AMPLITUDE_API_KEY,
NEXT_PUBLIC_SOKNADSDIALOG: process.env.NEXT_PUBLIC_SOKNADSDIALOG,
},
basePath: `${process.env.NEXT_PUBLIC_BASE_PATH}`,
async headers() {
const csp = await buildCspHeader(myAppDirectives, {
env: process.env.DEKORATOR_ENV,
});
module.exports = async (phase) =>
withPlugins([withTM], {
//withSentryConfig(
publicRuntimeConfig: {
amplitudeKey: process.env.AMPLITUDE_API_KEY,
NEXT_PUBLIC_SOKNADSDIALOG: process.env.NEXT_PUBLIC_SOKNADSDIALOG,
},
basePath: `${process.env.NEXT_PUBLIC_BASE_PATH}`,
async headers() {
const csp = await buildCspHeader(myAppDirectives, {
env: process.env.DEKORATOR_ENV,
});

return [
{
source: "/:path*",
headers: [
{
key: "Content-Security-Policy",
value: csp,
},
],
},
];
},
async redirects() {
return [
{
source: "/app/tema(.*)",
destination: "/",
permanent: false,
},
];
},
i18n: {
locales: ["no", "en"],
defaultLocale: "no",
localeDetection: false,
},
});
/*,
{ silent: true }
);*/
return [
{
source: "/:path*",
headers: [
{
key: "Content-Security-Policy",
value: csp,
},
],
},
];
},
async redirects() {
return [
{
source: "/app/tema(.*)",
destination: "/",
permanent: false,
},
];
},
i18n: {
locales: ["no", "en"],
defaultLocale: "no",
localeDetection: false,
},
})(phase, { undefined });
16 changes: 10 additions & 6 deletions package-lock.json

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

0 comments on commit 6125e67

Please sign in to comment.