I'm building a Flask/Apache2 web app that includes large video files that a user must be authenticated to view. I'd like to use Flask to serve the video files after authentication and not having to expose the media directory instead of just the plain HTML video tag that anyone with the URL can access.
I've tried using flask's send_file which works for things like images and thumbnails but large videos take forever to buffer and freeze up.
I see that NGINX has X-Accel-Redirect for the redirection of video files on my server (hidden, not in the web directory) to go to the user through flask but I'm not that sure how to implement this with Apache2.
Running Flask, Apache2, Ubuntu
TLDR: Basically trying to send large files to the user through flask (not using send_file as this freezes) to enable authentication and not having to expose the whole directory to the internet with the files as I would with the video HTML tag. NGINX has X-Accel-Redirect, what's the apache2 equivalent for use in flask?
Thanks!