Skip to content
Snippets Groups Projects
Commit cb66106c authored by FionaDmello's avatar FionaDmello
Browse files

Merge branch 'dev' into feature/record-details-page

parents 87cf24e5 e3249609
No related branches found
No related tags found
1 merge request!58Draft: Feature Details Page
Pipeline #504651 passed
import createNextIntlPlugin from "next-intl/plugin"; import createNextIntlPlugin from "next-intl/plugin";
import type { NextConfig } from 'next' import type { NextConfig } from "next";
const withNextIntl = createNextIntlPlugin(); const withNextIntl = createNextIntlPlugin();
...@@ -8,6 +8,36 @@ const nextConfig: NextConfig = { ...@@ -8,6 +8,36 @@ const nextConfig: NextConfig = {
eslint: { eslint: {
dirs: ["src"], dirs: ["src"],
}, },
async headers() {
return [
{
source: "/api/:path*",
headers: [
{
key: "Access-Control-Allow-Origin",
value: "*", // Set your origin
},
{
key: "Access-Control-Allow-Methods",
value: "GET, OPTIONS",
},
],
},
{
source: "/:path*",
headers: [
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "Content-Security-Policy",
value: "frame-src 'none'",
},
],
},
];
},
images: { images: {
remotePatterns: [ remotePatterns: [
{ {
......
...@@ -44,7 +44,6 @@ export default function RootLayout({ ...@@ -44,7 +44,6 @@ export default function RootLayout({
params: Promise<{ locale: string }>; params: Promise<{ locale: string }>;
}>) { }>) {
const { locale } = React.use(params); const { locale } = React.use(params);
// Ensure that the incoming `locale` is valid // Ensure that the incoming `locale` is valid
if (!routing.locales.includes(locale as any)) { if (!routing.locales.includes(locale as any)) {
notFound(); notFound();
......
{ {
"compilerOptions": { "compilerOptions": {
"lib": [ "lib": ["dom", "dom.iterable", "esnext"],
"dom",
"dom.iterable",
"esnext",
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
...@@ -19,27 +15,16 @@ ...@@ -19,27 +15,16 @@
"incremental": true, "incremental": true,
"plugins": [ "plugins": [
{ {
"name": "next", "name": "next"
} }
], ],
"paths": { "paths": {
"@/*": [ "@/*": ["./src/*"],
"./src/*", "@api/*": ["./src/app/api/*"]
],
"@api/*": [
"./src/app/api/*",
]
}, },
"downlevelIteration": true, "downlevelIteration": true,
"target": "ES2017" "target": "ES2017"
}, },
"include": [ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"next-env.d.ts", "exclude": ["node_modules"]
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
],
"exclude": [
"node_modules",
]
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment