-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathnext.config.ts
More file actions
51 lines (49 loc) · 1.23 KB
/
next.config.ts
File metadata and controls
51 lines (49 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import type { NextConfig } from "next";
import { baseURL } from "./baseUrl";
const nextConfig: NextConfig = {
assetPrefix: baseURL,
allowedDevOrigins: [
"http://127.0.0.1:3000",
"http://127.0.0.1:3001",
"http://localhost:3000",
"http://localhost:3001",
],
images: {
remotePatterns: [
{
protocol: "https",
hostname: "images.workoscdn.com",
pathname: "/images/*",
},
],
},
async headers() {
return [
{
// Apply CORS headers to API routes
source: "/.well-known/:path*",
headers: [
{ key: "Access-Control-Allow-Origin", value: "*" },
{
key: "Access-Control-Allow-Methods",
value: "GET,POST,PUT,DELETE,OPTIONS",
},
{ key: "Access-Control-Allow-Headers", value: "*" },
],
},
{
// Apply CORS headers to MCP endpoint
source: "/mcp",
headers: [
{ key: "Access-Control-Allow-Origin", value: "*" },
{
key: "Access-Control-Allow-Methods",
value: "GET,POST,PUT,DELETE,OPTIONS",
},
{ key: "Access-Control-Allow-Headers", value: "*" },
],
},
];
},
};
export default nextConfig;