chore: version info modal
This commit is contained in:
+3
-3
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user