mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-03 14:20:50 +08:00
fix(安全): 本地音乐 API 仅监听回环地址
This commit is contained in:
@@ -67,7 +67,9 @@ async function startMusicApi(): Promise<void> {
|
||||
|
||||
try {
|
||||
await server.serveNcmApi({
|
||||
port
|
||||
port,
|
||||
// 安全默认值:仅监听本机回环地址,避免对局域网暴露
|
||||
host: '127.0.0.1'
|
||||
});
|
||||
console.log(`MUSIC API STARTED on port ${port}`);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user