Skip to content

Commit 5dda9fc

Browse files
author
Taois
committed
feat: 修复直播请求头去除
1 parent 838d341 commit 5dda9fc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dashboard/src/api/services/live.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@ class LiveService {
7373

7474
// 获取直播文件内容
7575
const response = await axios.get(liveConfig.url, {
76-
timeout: 15000,
77-
headers: {
78-
'User-Agent': liveConfig.ua || 'Mozilla/5.0'
79-
}
76+
timeout: 15000
77+
// 注意:浏览器环境下不能设置 User-Agent 头,浏览器会自动处理
8078
})
8179

8280
if (!response.data) {

0 commit comments

Comments
 (0)