统一API Base URL保存与请求时去除末尾斜杠
This commit is contained in:
@@ -5,6 +5,7 @@ import { NextRequest, NextResponse } from 'next/server';
|
||||
import { getAuthInfoFromCookie } from '@/lib/auth';
|
||||
import { getConfig, setCachedConfig } from '@/lib/config';
|
||||
import { db } from '@/lib/db';
|
||||
import { normalizeApiBaseUrl } from '@/lib/url';
|
||||
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
@@ -63,7 +64,7 @@ export async function POST(request: NextRequest) {
|
||||
// 更新缓存中的音乐配置
|
||||
adminConfig.MusicConfig = {
|
||||
Enabled,
|
||||
BaseUrl,
|
||||
BaseUrl: normalizeApiBaseUrl(BaseUrl),
|
||||
Token,
|
||||
ProxyEnabled: ProxyEnabled ?? true,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user