chore: version info modal

This commit is contained in:
jialin
2024-07-12 12:06:17 +08:00
parent c5327d3e56
commit 320db56fbe
38 changed files with 334 additions and 108 deletions
+3 -3
View File
@@ -1,16 +1,16 @@
const proxyTableList = ['cli', 'v1', 'auth', 'v1-openai'];
const proxyTableList = ['cli', 'v1', 'auth', 'v1-openai', 'version'];
// @ts-ingore
export default function createProxyTable(target?: string) {
const proxyTable = proxyTableList.reduce(
(obj: Record<string, object>, api) => {
const newTarget = target || 'http://localhost';
obj[`/${api}/`] = {
obj[`/${api}`] = {
target: newTarget,
changeOrigin: true,
secure: false,
ws: true,
pathRewrite: (pth: string) => pth.replace(`/^/${api}/`, `/${api}`),
pathRewrite: (pth: string) => pth.replace(`/^/${api}`, `/${api}`),
// onProxyRes: (proxyRes: any, req: any, res: any) => {
// if (req.headers.accept === 'text/event-stream') {
// res.writeHead(res.statusCode, {