-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
17 lines (15 loc) · 605 Bytes
/
Copy pathnext.config.ts
File metadata and controls
17 lines (15 loc) · 605 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
serverExternalPackages: ["postgres", "node:child_process/promises"],
headers: async () => [
{
source: "/api/:path*",
headers: [
{ key: "Access-Control-Allow-Origin", value: process.env.ALLOWED_ORIGINS || process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000" },
{ key: "Access-Control-Allow-Methods", value: "GET, POST, PUT, PATCH, DELETE, OPTIONS" },
{ key: "Access-Control-Allow-Headers", value: "Content-Type, Authorization" },
],
},
],
};
export default nextConfig;