From fbc9061b2149686ff955504be6b7c100ef27b516 Mon Sep 17 00:00:00 2001 From: NoPlagiarism <37241775+NoPlagiarism@users.noreply.github.com> Date: Tue, 16 Aug 2022 02:30:08 +0500 Subject: [PATCH] vt.tiktok.com + tiktok.com/t support --- app/Controllers/RedirectController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/RedirectController.php b/app/Controllers/RedirectController.php index 395ed42..a3482a4 100644 --- a/app/Controllers/RedirectController.php +++ b/app/Controllers/RedirectController.php @@ -52,7 +52,7 @@ class RedirectController { * to_endpoint maps a TikTok URL into a ProxiTok-compatible endpoint URL. */ static private function to_endpoint(string $url): string { - if (preg_match('%^https://vm\.tiktok\.com/([A-Za-z0-9]+)%', $url, $m)) { + if (preg_match('%^https://(?:vm|vt)+\.tiktok\.com/(?:t/)([A-Za-z0-9]+)%', $url, $m)) { // Short video URL return '/@placeholder/video/' . $m[1]; } elseif (preg_match('%^https://www\.tiktok\.com/(.+)%', $url, $m)) {