Skip to content

Commit 2d3e90e

Browse files
committed
feat: timeout 시간 변경
1 parent 8a98e55 commit 2d3e90e

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/routes/middleware/validation/uploadValidation.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,7 @@ const validateUploadUrl = async (req, res, next) => {
3333
throw error;
3434
}
3535

36-
const videoInfo = await ytdl.getBasicInfo(youtubeUrl, {
37-
agent,
38-
requestOptions: {
39-
headersTimeout: 1000 * 10,
40-
bodyTimeout: 1000 * 10,
41-
headers: {
42-
referer: "https://www.youtube.com/",
43-
},
44-
},
45-
});
36+
const videoInfo = await ytdl.getBasicInfo(youtubeUrl, { agent });
4637

4738
validateMetadata(videoInfo.videoDetails);
4839

src/services/videoService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const getYoutubeVideo = async (youtubeUrl) => {
1515
quality: "highestvideo",
1616
agent,
1717
requestOptions: {
18-
headersTimeout: 1000 * 10,
19-
bodyTimeout: 1000 * 10,
18+
headersTimeout: 1000 * 30,
19+
bodyTimeout: 1000 * 30,
2020
headers: {
2121
referer: "https://www.youtube.com/",
2222
},

0 commit comments

Comments
 (0)