Redirect linked profile subpages (fix #603)

This commit is contained in:
dangered wolf 2024-01-22 19:43:38 -05:00
parent 034a9614cc
commit d446093588
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58

View file

@ -102,5 +102,8 @@ twitter.get('/hashtag/:hashtag', genericTwitterRedirect);
twitter.get('/:handle/', _profileRequest); twitter.get('/:handle/', _profileRequest);
twitter.get('/:handle', _profileRequest); twitter.get('/:handle', _profileRequest);
/* Redirect profile subpages in case someone links them for some reason (https://github.com/FixTweet/FxTwitter/issues/603) */
twitter.get('/:handle/:subpage', genericTwitterRedirect);
twitter.get('/:handle/:subpage/', genericTwitterRedirect);
twitter.all('*', async c => c.redirect(Constants.REDIRECT_URL, 302)); twitter.all('*', async c => c.redirect(Constants.REDIRECT_URL, 302));