2023-05-25 06:30:36 +00:00
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
|
const nextConfig = {
|
2024-09-27 14:52:44 +02:00
|
|
|
poweredByHeader: false,
|
2024-05-14 09:40:58 +02:00
|
|
|
transpilePackages: [
|
2024-06-05 08:52:41 +02:00
|
|
|
"@link-stack/leafcutter-ui",
|
|
|
|
|
"@link-stack/opensearch-common",
|
|
|
|
|
"@link-stack/ui",
|
|
|
|
|
"@link-stack/bridge-common",
|
|
|
|
|
"@link-stack/bridge-ui",
|
2024-08-28 10:06:43 +02:00
|
|
|
"mui-chips-input",
|
2024-05-14 09:40:58 +02:00
|
|
|
],
|
2024-09-04 12:09:28 +02:00
|
|
|
headers: async () => {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
source: "/((?!zammad).*)",
|
|
|
|
|
headers: [
|
|
|
|
|
{
|
|
|
|
|
key: "Strict-Transport-Security",
|
|
|
|
|
value: "max-age=63072000; includeSubDomains; preload",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "X-Frame-Options",
|
2024-11-28 08:27:20 +01:00
|
|
|
value: "SAMEORIGIN",
|
2024-09-04 12:09:28 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "X-Content-Type-Options",
|
|
|
|
|
value: "nosniff",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
];
|
2023-05-25 12:37:14 +00:00
|
|
|
},
|
2024-08-28 10:06:43 +02:00
|
|
|
rewrites: async () => {
|
|
|
|
|
return {
|
|
|
|
|
beforeFiles: [
|
|
|
|
|
{
|
|
|
|
|
source: "/api/v1/:path*",
|
2024-09-04 12:09:28 +02:00
|
|
|
destination: `${process.env.ZAMMAD_URL ?? "http://zammad-nginx:8080"}/api/v1/:path*`,
|
2024-08-28 10:06:43 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: "/ws",
|
2024-09-04 12:09:28 +02:00
|
|
|
destination: `${process.env.ZAMMAD_URL ?? "http://zammad-nginx:8080"}/ws`,
|
2024-08-28 10:06:43 +02:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
2022-12-02 10:55:56 +00:00
|
|
|
};
|
2023-05-25 06:30:36 +00:00
|
|
|
|
2024-05-14 09:40:58 +02:00
|
|
|
export default nextConfig;
|