feat: 优化 getToken 函数,移除无用的响应参数,调整授权过滤逻辑以支持新路径

This commit is contained in:
2025-12-23 13:15:16 +08:00
parent 4bdebd66d4
commit 371d66b289
3 changed files with 8 additions and 13 deletions

View File

@@ -10,7 +10,7 @@ import chalk from 'chalk';
import { AssistantApp } from './lib.ts';
import { getBunPath } from './module/get-bun-path.ts';
import { qwenAsr } from './services/asr/qwen-asr.ts';
export const runServer = async (port: number = 51015, listenPath = '127.0.0.1') => {
export const runServer = async (port: number = 51515, listenPath = '127.0.0.1') => {
let _port: number | undefined;
if (port) {
_port = await getPort({ port });
@@ -21,7 +21,7 @@ export const runServer = async (port: number = 51015, listenPath = '127.0.0.1')
}
if (!_port) {
// 检车端口可用性
const isPortAvailable = await getPort({ port: portNumbers(51015, 52000) });
const isPortAvailable = await getPort({ port: portNumbers(51515, 52000) });
if (!isPortAvailable) {
console.log(`Port ${isPortAvailable} is not available`);
process.exit(1);