aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-11 14:37:35 +0200
committerChocobozzz <me@florianbigard.com>2021-10-11 14:37:35 +0200
commit5773128647398d8482a129da3f647c3f0795127d (patch)
treed72ba4e402aa64ac44f662de63a9760df9a724a2
parent1db57e6f966875613b6e5f789a90410355d445ef (diff)
downloadPeerTube-5773128647398d8482a129da3f647c3f0795127d.tar.gz
PeerTube-5773128647398d8482a129da3f647c3f0795127d.tar.zst
PeerTube-5773128647398d8482a129da3f647c3f0795127d.zip
Improve regexp performance
-rw-r--r--server/middlewares/validators/oembed.ts2
1 files changed, 1 insertions, 1 deletions
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[]) {
28const startPlaylistURLs = buildUrls(playlistPaths) 28const startPlaylistURLs = buildUrls(playlistPaths)
29const startVideoURLs = buildUrls(videoPaths) 29const startVideoURLs = buildUrls(videoPaths)
30 30
31const watchRegex = /([^/]+)$/ 31const watchRegex = /\/([^/]+)$/
32const isURLOptions = { 32const isURLOptions = {
33 require_host: true, 33 require_host: true,
34 require_tld: true 34 require_tld: true