Git-Repository für bestehenden archivdms-Code initialisiert, Branch-/Commit-Konvention (feature/<ticket>-<slug>-Branches, Ticket-Prefix in Commit-Nachricht) etabliert.
29 lines
862 B
TypeScript
29 lines
862 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
turbopack: {
|
|
root: __dirname,
|
|
},
|
|
async rewrites() {
|
|
const apiBase = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080";
|
|
return [
|
|
{
|
|
source: "/api/:path*",
|
|
destination: `${apiBase}/api/:path*`,
|
|
},
|
|
{
|
|
// Unauthenticated public share endpoints live at the backend's
|
|
// /public/* routes (NOT under /api, and without the auth middleware —
|
|
// see internal/api/public_share_handlers.go). They are proxied under a
|
|
// distinct /public/api/* prefix so they never collide with the
|
|
// human-facing Next.js page at /public/share/[token].
|
|
source: "/public/api/:path*",
|
|
destination: `${apiBase}/public/:path*`,
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|