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
| import type { NextConfig } from "next";
|
| const nextConfig: NextConfig = {
| async rewrites() {
| return [
| {
| source: '/code/:path*',
| destination: 'http://127.0.0.1:8000/code/:path*',
| },
| {
| source: '/api/sessions',
| destination: 'http://127.0.0.1:8000/api/sessions',
| },
| {
| source: '/api/sessions/:path*',
| destination: 'http://127.0.0.1:8000/api/sessions/:path*',
| },
| // 工作流 API
| {
| source: '/api/project/:path*',
| destination: 'http://127.0.0.1:8000/api/project/:path*',
| },
| {
| source: '/api/stages',
| destination: 'http://127.0.0.1:8000/api/stages',
| },
| // 临时工作台 API
| {
| source: '/api/sandbox/:path*',
| destination: 'http://127.0.0.1:8000/api/sandbox/:path*',
| },
| ];
| },
| };
|
| export default nextConfig;
|
|