1
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
||||
export const API_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://127.0.0.1:8000";
|
||||
const configuredApiUrl = process.env.NEXT_PUBLIC_API_URL;
|
||||
export const API_URL = configuredApiUrl === undefined ? "http://127.0.0.1:8000" : configuredApiUrl || "/api";
|
||||
|
||||
export type Subject = { id: number; name: string; slug: string; created_at: string };
|
||||
export type Week = { id: number; subject_id: number; number: number; title?: string | null; created_at: string };
|
||||
|
||||
@@ -5,12 +5,12 @@ const nextConfig = {
|
||||
output: "standalone",
|
||||
async rewrites() {
|
||||
return [
|
||||
{ source: "/health", destination: `${backendUrl}/health` },
|
||||
{ source: "/settings/:path*", destination: `${backendUrl}/settings/:path*` },
|
||||
{ source: "/subjects/:path*", destination: `${backendUrl}/subjects/:path*` },
|
||||
{ source: "/sources/:path*", destination: `${backendUrl}/sources/:path*` },
|
||||
{ source: "/documents/:path*", destination: `${backendUrl}/documents/:path*` },
|
||||
{ source: "/jobs/:path*", destination: `${backendUrl}/jobs/:path*` },
|
||||
{ source: "/api/health", destination: `${backendUrl}/health` },
|
||||
{ source: "/api/settings/:path*", destination: `${backendUrl}/settings/:path*` },
|
||||
{ source: "/api/subjects/:path*", destination: `${backendUrl}/subjects/:path*` },
|
||||
{ source: "/api/sources/:path*", destination: `${backendUrl}/sources/:path*` },
|
||||
{ source: "/api/documents/:path*", destination: `${backendUrl}/documents/:path*` },
|
||||
{ source: "/api/jobs/:path*", destination: `${backendUrl}/jobs/:path*` },
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user