hit-cxf
2026-05-20 fd892c8b148eda040cb0ffde1502b583fb5c377f
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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',
      },
      {
        source: '/api/upload_media',
        destination: 'http://127.0.0.1:8000/api/upload_media',
      },
      {
        source: '/api/models',
        destination: 'http://127.0.0.1:8000/api/models',
      },
      {
        source: '/api/config',
        destination: 'http://127.0.0.1:8000/api/config',
      },
      {
        source: '/api/cache/:path*',
        destination: 'http://127.0.0.1:8000/api/cache/:path*',
      },
      // 一键 pipeline API
      {
        source: '/api/pipelines',
        destination: 'http://127.0.0.1:8000/api/pipelines',
      },
      {
        source: '/api/pipelines/:path*',
        destination: 'http://127.0.0.1:8000/api/pipelines/:path*',
      },
      {
        source: '/api/tasks',
        destination: 'http://127.0.0.1:8000/api/tasks',
      },
      {
        source: '/api/tasks/:path*',
        destination: 'http://127.0.0.1:8000/api/tasks/:path*',
      },
      // 临时工作台 API
      {
        source: '/api/sandbox/:path*',
        destination: 'http://127.0.0.1:8000/api/sandbox/:path*',
      },
    ];
  },
};
 
export default nextConfig;