mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-07 22:31:35 -05:00
55 lines
1.3 KiB
JavaScript
55 lines
1.3 KiB
JavaScript
/**
|
|
* @type {import('next').NextConfig}
|
|
*/
|
|
|
|
var path = require("path");
|
|
|
|
module.exports = {
|
|
reactStrictMode: true,
|
|
output: "standalone",
|
|
experimental: {
|
|
outputFileTracingRoot: path.join(__dirname, "../../"),
|
|
/* serverComponentsExternalPackages: ["@prisma/client"], */
|
|
},
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "avatars.githubusercontent.com",
|
|
},
|
|
],
|
|
},
|
|
webpack: (config) => {
|
|
config.externals = [...(config.externals || []), "@prisma/client"];
|
|
// Important: return the modified config
|
|
return config;
|
|
},
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: "/",
|
|
destination: "/app/",
|
|
permanent: false,
|
|
},
|
|
];
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
// matching all API routes
|
|
source: "/api/capture/:path*",
|
|
headers: [
|
|
{ key: "Access-Control-Allow-Credentials", value: "true" },
|
|
{ key: "Access-Control-Allow-Origin", value: "*" },
|
|
{ key: "Access-Control-Allow-Methods", value: "GET,OPTIONS,PATCH,DELETE,POST,PUT" },
|
|
{
|
|
key: "Access-Control-Allow-Headers",
|
|
value:
|
|
"X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|