Announcement

#1 2014-11-02 14:13:37

komi
Member
2014-10-17
22

Videos and htaccess

Hi,

in my Apache configuration I have 'Deny from all' for the galleries folder and for the _data/i/ folder to protect direct access to the images. For the images, this works fine. For the videos, though, I get the error 'The video could not be loaded, either because the server or network failed or because the format is not supported.' If I remove 'Deny from all' for the galleries folder, the video plays.

My question is: can the videojs plugin be made to play the videos in the same way the images are displayed, so that it is possible to protect the video files from direct link access? Or is any other video plugin capable of that?

Cheers
Konstantin

Offline

 

#2 2014-11-02 14:16:53

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3270

Re: Videos and htaccess

Hi

no way

the image protection works because everything is processed by i.php file, but this is not doable for a file as big as a video

the video player (client) must have access to the file on the server, and "deny from all" prevents this, and it will be the same for every player

Offline

 

#3 2014-11-02 14:21:23

komi
Member
2014-10-17
22

Re: Videos and htaccess

Thanks for the fast reply. Is there any other way to protect video files from unauthorized access?

Konstantin

Offline

 

#4 2014-11-03 17:38:28

xbgmsharp
Member
1970-01-01
215

Re: Videos and htaccess

One way it to check the referer.
All request should come from domain.com and not any other.
Is the referer is not your own website, you can refuse access.
You can also filter with the file extension.
You can find sample by googeling htaccess referer.
Hope this help.

Offline

 

#5 2014-11-03 20:59:28

flop25
Piwigo Team
2006-07-06
6858

Re: Videos and htaccess

xbgmsharp wrote:

One way it to check the referer.
All request should come from domain.com and not any other.
Is the referer is not your own website, you can refuse access.
You can also filter with the file extension.
You can find sample by googeling htaccess referer.
Hope this help.

Custom http request can be easily made


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2018 · Contact