Complete all for Items

This commit is contained in:
2026-07-17 14:27:51 +05:30
parent f72b24fcaa
commit 62a5d857de
103 changed files with 2540 additions and 3259 deletions
+27
View File
@@ -0,0 +1,27 @@
import type { NextConfig } from "next"
import path from "path"
// The backend is proxied rather than called cross-origin. This makes /api/* same-origin,
// which means (a) no CORS config is needed on ERPCore, and (b) its Secure/SameSite=Strict
// session cookies just work. BACKEND_ORIGIN is server-side only — deliberately not
// NEXT_PUBLIC_*, since the browser only ever talks to this Next server.
//
// Defaults to the backend's HTTP port: the HTTPS port uses a self-signed dev cert that
// this proxy would reject.
const BACKEND_ORIGIN = process.env.BACKEND_ORIGIN ?? "http://localhost:5224"
const nextConfig: NextConfig = {
turbopack: {
root: path.join(__dirname),
},
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${BACKEND_ORIGIN}/api/:path*`,
},
]
},
}
export default nextConfig