File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / lighttpd / doc / outdated / trigger_b4_dl.txt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Nov 2 10:35:00 2016 UTC (7 years, 8 months ago) by misho
Branches: lighttpd, MAIN
CVS tags: v1_4_41p8, HEAD
lighttpd 1.4.41

=======================
Trigger before Download
=======================

-------------------------
Module: mod_trigger_b4_dl
-------------------------

:Author: Jan Kneschke
:Date: $Date: 2016/11/02 10:35:00 $
:Revision: $Revision: 1.1.1.2 $

:abstract:
  another anti-hot-linking module

.. meta::
  :keywords: lighttpd, hot-linking, deep-linking

.. contents:: Table of Contents

Description
===========

Anti Hotlinking:

 * if user requests ''download-url'' directly, the request is denied and he is redirected to ''deny-url'
 * if user visits ''trigger-url'' before requesting ''download-url'', access is granted
 * if user visits ''download-url'' again after ''trigger-timeout'' has elapsed, the request is denied and he is redirected to ''deny-url''

The trigger information is either stored locally in a gdbm file or remotely in memcached.

Requirements
------------

 * libpcre
 * libgdbm or libmemcached

Options
=======

::

  trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
  trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
  trigger-before-download.trigger-url = "^/trigger/"
  trigger-before-download.download-url = "^/download/"
  trigger-before-download.deny-url = "http://192.168.1.5:1025/index.html"
  trigger-before-download.trigger-timeout = 10

If both trigger-before-download.gdbm-filename and
trigger-before-download.memcache-hosts is set gdbm will take precedence.

Installation
============

memcached should be started with the option -M as we don't want to remove entry if the memory is full.


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>