Remove unneeded headers

This commit is contained in:
SergeantPanda 2025-09-05 20:26:35 -05:00
parent 18b8462a5f
commit 1a8763731b

View file

@ -604,20 +604,12 @@ class MultiWorkerVODConnectionManager:
logger.warning(f"[{client_id}] No user-agent available (neither M3U nor client)")
# Forward important headers from request
important_headers = ['authorization', 'x-forwarded-for', 'x-real-ip', 'referer', 'origin', 'accept']
important_headers = ['authorization', 'referer', 'origin', 'accept']
for header_name in important_headers:
django_header = f'HTTP_{header_name.upper().replace("-", "_")}'
if hasattr(request, 'META') and django_header in request.META:
headers[header_name] = request.META[django_header]
# Add client IP
if client_ip:
headers['X-Forwarded-For'] = client_ip
headers['X-Real-IP'] = client_ip
# Add worker identification
headers['X-Worker-ID'] = self.worker_id
# Create connection state in Redis with consolidated session metadata
if not redis_connection.create_connection(
stream_url=modified_stream_url,