Skip to content

Commit c5032cd

Browse files
committed
feat: d
1 parent c2dd61d commit c5032cd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/routes/middleware/validation/uploadValidation.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ const validateUploadUrl = async (req, res, next) => {
2020
validateFields(req.body, REQUIRED_FIELDS.VIDEO_UPLOAD_REQUEST);
2121

2222
const { youtubeUrl } = req.body;
23-
const isValid = ytdl.validateURL(youtubeUrl);
23+
const agent = ytdl.createProxyAgent({
24+
uri: "http://152.26.229.66:9443",
25+
});
26+
const isValid = ytdl.validateURL(youtubeUrl, agent);
2427

2528
if (!isValid) {
2629
const error = new createError.BadRequest(MESSAGES.ERROR.INVALID_URL);

0 commit comments

Comments
 (0)