1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-22 15:47:30 +00:00

Add redirects for /watch/, /w/, /v/, /shorts/

This commit is contained in:
Cadence Ember 2021-02-19 01:34:08 +13:00
parent 7fee8b21bc
commit cfe5209531
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17

View File

@ -3,7 +3,7 @@ const {redirect} = require("pinski/plugins")
module.exports = [ 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? Why not URLSearchParams?
URLSearchParams is an unordered map, and URLs are more URLSearchParams is an unordered map, and URLs are more