2024-10-09 09:56:45 +02:00
|
|
|
import createNextIntlPlugin from "next-intl/plugin";
|
|
|
|
|
|
|
|
|
|
const withNextIntl = createNextIntlPlugin();
|
|
|
|
|
|
2023-04-03 13:39:51 +02:00
|
|
|
/** @type {import('next').NextConfig} */
|
2024-03-08 11:39:17 +01:00
|
|
|
|
|
|
|
|
const secureHeaders = [
|
|
|
|
|
{
|
|
|
|
|
key: "Strict-Transport-Security",
|
|
|
|
|
value: "max-age=63072000; includeSubDomains; preload",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "Referrer-Policy",
|
|
|
|
|
value: "origin-when-cross-origin",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "X-Frame-Options",
|
|
|
|
|
value: "SAMEORIGIN",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "X-Content-Type-Options",
|
|
|
|
|
value: "nosniff",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "X-XSS-Protection",
|
|
|
|
|
value: "1; mode=block",
|
|
|
|
|
},
|
|
|
|
|
// img-src vercel.com needed for deploy button,
|
|
|
|
|
// script-src va.vercel-scripts.com for analytics/vercel scripts
|
|
|
|
|
{
|
|
|
|
|
key: "Content-Security-Policy",
|
|
|
|
|
value:
|
|
|
|
|
"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com; connect-src 'self'; child-src; style-src 'self' 'unsafe-inline'; font-src 'self'; object-src 'none'; img-src 'self' https://vercel.com;",
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
2023-04-03 13:39:51 +02:00
|
|
|
const nextConfig = {
|
|
|
|
|
reactStrictMode: true, // Recommended for the `pages` directory, default in `app`.
|
2024-11-22 11:25:03 +01:00
|
|
|
experimental: {
|
|
|
|
|
dynamicIO: true,
|
|
|
|
|
},
|
2023-04-03 13:39:51 +02:00
|
|
|
images: {
|
|
|
|
|
remotePatterns: [
|
2023-05-23 10:12:19 +02:00
|
|
|
{
|
|
|
|
|
protocol: "https",
|
2023-06-16 01:36:19 +02:00
|
|
|
hostname: process.env.ZITADEL_API_URL?.replace("https://", "") || "",
|
2023-05-23 10:12:19 +02:00
|
|
|
port: "",
|
|
|
|
|
pathname: "/**",
|
|
|
|
|
},
|
2023-05-25 08:40:53 +02:00
|
|
|
{
|
|
|
|
|
protocol: "http",
|
|
|
|
|
hostname: "localhost",
|
|
|
|
|
port: "8080",
|
|
|
|
|
pathname: "/**",
|
|
|
|
|
},
|
2023-04-03 13:39:51 +02:00
|
|
|
],
|
|
|
|
|
},
|
2024-03-08 11:39:17 +01:00
|
|
|
async headers() {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
source: "/:path*",
|
|
|
|
|
headers: secureHeaders,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
},
|
2023-04-03 13:39:51 +02:00
|
|
|
};
|
|
|
|
|
|
2024-10-09 09:56:45 +02:00
|
|
|
export default withNextIntl(nextConfig);
|