Files
openwork/apps/share/next.config.ts
Source Open c41b695efd fix(share): unify Next config for public routes (#1149)
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>
2026-03-24 15:10:33 -07:00

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);