mirror of
https://github.com/different-ai/openwork
synced 2026-04-25 17:15:34 +02:00
Keep BotId and the share rewrites in one canonical Next config so public /v1 routes keep resolving after security hardening changes. Co-authored-by: Omar McAdam <omar@OpenWork-Studio.localdomain>
23 lines
591 B
TypeScript
23 lines
591 B
TypeScript
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import type { NextConfig } from "next";
|
|
import { withBotId } from "botid/next/config";
|
|
|
|
const rootDir = dirname(fileURLToPath(import.meta.url));
|
|
const workspaceRoot = resolve(rootDir, "../..");
|
|
|
|
const nextConfig: NextConfig = {
|
|
reactStrictMode: true,
|
|
turbopack: {
|
|
root: workspaceRoot
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
{ source: "/health", destination: "/api/health" },
|
|
{ source: "/v1/:path*", destination: "/api/v1/:path*" }
|
|
];
|
|
}
|
|
};
|
|
|
|
export default withBotId(nextConfig);
|