From 5773128647398d8482a129da3f647c3f0795127d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 Oct 2021 14:37:35 +0200 Subject: Improve regexp performance --- server/middlewares/validators/oembed.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server') diff --git a/server/middlewares/validators/oembed.ts b/server/middlewares/validators/oembed.ts index 96c8adc99..cbd645a71 100644 --- a/server/middlewares/validators/oembed.ts +++ b/server/middlewares/validators/oembed.ts @@ -28,7 +28,7 @@ function buildUrls (paths: string[]) { const startPlaylistURLs = buildUrls(playlistPaths) const startVideoURLs = buildUrls(videoPaths) -const watchRegex = /([^/]+)$/ +const watchRegex = /\/([^/]+)$/ const isURLOptions = { require_host: true, require_tld: true -- cgit v1.2.3