Prevent .mp4 download


Hi here! I want to prevent downloading mp4 of the archive but give an opportunity to see the archive. I use Flussonic DVR player.

Is it possible?

Hi, you can use auth backend and answer 403 according to the protocol type. You will see something like: {proto,mp4}

In logs during mp4 request you will see something like:

2021-11-30 15:44:48.153 <0.1570.0> [fake] UID:token:sometoken/real-ip auth_backend:358 Backend auth request "auth://1" ([{ip,<<"real-ip">>},{name,<<"fake">>},{proto,mp4},{token,<<"sometoken">>},{dvr,true}],no_extra,#{country => <<"RU">>,duration => 0,host => <<"Flussonic-IP">>,media_request => <<"dvr_packetizer-preview_mp4_frame">>,method => get,port => 443,qs => <<"token=sometoken">>,referer => <<"Flussonic-IP/fake/embed.html?dvr=true&token=sometoken">>,request_number => 0,request_type => new_session,return => summary,session_id => <<"61a646f0-4433-47bb-996e-55cf4b105642">>,session_type => play,ssl => true,stream_clients => 1,total_clients => 1,user_agent => <<"Mozilla/5.0 (X11"...>>,user_name => <<"fake">>}): Code: allow, user_id: token:sometoken/real-ip, time: 0ms