From 332300eed7b847cf8ff601bdd2410966c3938df8 Mon Sep 17 00:00:00 2001 From: Nazar Leush Date: Fri, 11 Sep 2026 10:45:03 +0300 Subject: [PATCH] bugfix `allow_origin` undefined --- lib/plugins/validators/async/21_checkContentType.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/validators/async/21_checkContentType.js b/lib/plugins/validators/async/21_checkContentType.js index c073cd597..1a756470b 100644 --- a/lib/plugins/validators/async/21_checkContentType.js +++ b/lib/plugins/validators/async/21_checkContentType.js @@ -125,7 +125,7 @@ export default { if ((data.type == CONFIG.T.stream_apple_mpegurl || data.type == CONFIG.T.stream_x_mpegurl) && data.allow_origin !== '*' - && (!data.request_origin && !data.allow_origin || data.allow_origin.indexOf(data.request_origin) == -1)) { + && (!data.request_origin && !data.allow_origin || data.allow_origin?.indexOf(data.request_origin) == -1)) { link.error = 'CORS headers on the player are not configured correctly'; } @@ -203,4 +203,4 @@ export default { }); } } -}; \ No newline at end of file +};