From cfe5209531e7ba62288f91337d1bea1f79198e2c Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Fri, 19 Feb 2021 01:34:08 +1300 Subject: [PATCH] Add redirects for /watch/, /w/, /v/, /shorts/ --- api/redirects.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/redirects.js b/api/redirects.js index e940798..733cd6c 100644 --- a/api/redirects.js +++ b/api/redirects.js @@ -3,7 +3,7 @@ const {redirect} = require("pinski/plugins") module.exports = [ { - route: `/(${constants.regex.video_id})`, priority: -1, methods: ["GET"], code: async ({fill, url}) => { + route: `/(?:watch/|w/|v/|shorts/)?(${constants.regex.video_id})`, priority: -1, methods: ["GET"], code: async ({fill, url}) => { /* Why not URLSearchParams? URLSearchParams is an unordered map, and URLs are more