From 9aad7ff77577bb9a63c45eea3700f3aa67d8c881 Mon Sep 17 00:00:00 2001 From: legop3 Date: Tue, 13 Jan 2026 02:06:19 -0500 Subject: [PATCH] srt read bypass --- server/src/services/videoAuthService.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/server/src/services/videoAuthService.js b/server/src/services/videoAuthService.js index 354ead88..42b3ac79 100644 --- a/server/src/services/videoAuthService.js +++ b/server/src/services/videoAuthService.js @@ -81,21 +81,7 @@ app.post('/mediamtx/auth', (req, res) => { logger.info('video auth request', { path: body.path, sessionId, stream: streamInfo, action, protocol, ip }); - const normalizedIp = (() => { - if (!ip) return ''; - if (ip.includes('::ffff:')) { - return ip.replace(/^::ffff:/, ''); - } - if (ip.includes('.') && ip.includes(':')) { - return ip.slice(0, ip.lastIndexOf(':')); - } - return ip; - })(); - const isLocal = - normalizedIp === '127.0.0.1' || - normalizedIp === '::1' || - normalizedIp === 'localhost'; - if (action === 'read' && protocol === 'srt' && streamInfo?.id && (isLocal || !normalizedIp)) { + if (action === 'read' && protocol === 'srt' && streamInfo?.id) { return res.status(200).end(); }