mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.88k stars 534 forks source link

Feature Request: Add Referrer to MP4 Requests for Enhanced CDN Security #1063

Open habibulilalbaab opened 2 months ago

habibulilalbaab commented 2 months ago

Context: I am using MediaCMS to serve media files via a CDN, and I've noticed that while referrers can be set for most requests, MP4 files (specifically original video files) are accessed directly without a referrer. This creates a potential security issue as these files can be accessed directly via the CDN.

Feature Request: I would like to request the addition of a referrer header for MP4 requests, ensuring that media files served via CDN are properly protected and only accessible through authorized requests. This would enhance security by preventing direct access to media files and allowing better control over how files are distributed through the CDN.

Proposed Solution:

Add an option in the MediaCMS configuration to enforce referrers for video (MP4) file requests. Ensure that the CDN respects the referrer header and only serves the file if the correct referrer is present. Benefit: This would greatly enhance security by preventing unauthorized or direct access to media files via the CDN, ensuring that only requests originating from authorized domains are allowed to access these files.

Thank you for considering this feature!