diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-11 14:37:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-11 14:37:35 +0200 |
commit | 5773128647398d8482a129da3f647c3f0795127d (patch) | |
tree | d72ba4e402aa64ac44f662de63a9760df9a724a2 /server/middlewares/validators | |
parent | 1db57e6f966875613b6e5f789a90410355d445ef (diff) | |
download | PeerTube-5773128647398d8482a129da3f647c3f0795127d.tar.gz PeerTube-5773128647398d8482a129da3f647c3f0795127d.tar.zst PeerTube-5773128647398d8482a129da3f647c3f0795127d.zip |
Improve regexp performance
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/oembed.ts | 2 |
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[]) { | |||
28 | const startPlaylistURLs = buildUrls(playlistPaths) | 28 | const startPlaylistURLs = buildUrls(playlistPaths) |
29 | const startVideoURLs = buildUrls(videoPaths) | 29 | const startVideoURLs = buildUrls(videoPaths) |
30 | 30 | ||
31 | const watchRegex = /([^/]+)$/ | 31 | const watchRegex = /\/([^/]+)$/ |
32 | const isURLOptions = { | 32 | const isURLOptions = { |
33 | require_host: true, | 33 | require_host: true, |
34 | require_tld: true | 34 | require_tld: true |