danswer/web/next.config.js
2023-05-22 14:11:27 -07:00

24 lines
628 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
output: "standalone",
redirects: async () => {
// In production, something else (nginx in the one box setup) should take
// care of this redirect. TODO (chris): better support setups where
// web_server and api_server are on different machines.
if (process.env.NODE_ENV === "production") return [];
return [
{
source: "/api/:path*",
destination: "http://localhost:8080/:path*", // Proxy to Backend
permanent: true,
},
];
},
};
module.exports = nextConfig;