37 lines
932 B
TypeScript
37 lines
932 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const API_DEST = process.env.API_BACKEND_URL || "http://localhost:8080/api/v1";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
allowedDevOrigins: ["192.168.31.168", "192.168.31.168:3000", "192.168.31.168:3443", "localhost", "127.0.0.1"],
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/api/v1/:path*",
|
|
destination: `${API_DEST}/:path*`,
|
|
},
|
|
];
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/api/v1/:path*",
|
|
headers: [
|
|
{ key: "Access-Control-Allow-Origin", value: "*" },
|
|
{ key: "Access-Control-Allow-Methods", value: "GET,POST,PUT,DELETE,PATCH,OPTIONS" },
|
|
{ key: "Access-Control-Allow-Headers", value: "Content-Type, Authorization" },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|