redirect legacy uppercase channel names too

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-03-24 13:28:33 +01:00
parent bc2cc428f8
commit 39d7cdb890
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020

View File

@ -120,6 +120,7 @@ router.get(/^\/user\/(.+)$/, handleEnsName) /* Legacy */
router.get(/^\/([a-z0-9-]+)$/, handlePublicChannel)
router.get(/^\/chat\/public\/([a-z0-9-]+)$/, handlePublicChannel) /* Legacy */
router.get(/^\/chat\/public\/([a-zA-Z0-9-]+)$/, (req, res) => res.redirect(req.originalUrl.toLowerCase()))
router.get(/^\/([a-zA-Z0-9-]+)$/, (req, res) => res.redirect(req.originalUrl.toLowerCase()))
/* Catchall for everything else */