1#######################################################################
2##
3##  Trigger before download
4## ---------------
5##
6## - if user requests ''download-url'' directly, the request is denied
7##   and he is redirected to ''deny-url'
8## - if user visits ''trigger-url'' before requesting ''download-url'',
9##   access is granted
10## - if user visits ''download-url'' again after ''trigger-timeout'' has
11##   elapsed, the request is denied and he is redirected to ''deny-url''
12##
13## http://www.lighttpd.net/documentation/trigger_b4_dl.html
14##
15server.modules += ( "mod_mod_trigger_b4_dl" )
16
17##
18## To store the trigger state you can either use a local GDBM
19## file or memcached(s).
20##
21
22##
23## Path to the local GDBM file.
24##
25trigger-before-download.gdbm-filename = home_dir + "/trigger.db"
26
27##
28## List of memcached servers.
29##
30#trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
31
32##
33## URL prefix a visitor has to visit before downloading is allowed
34##
35trigger-before-download.trigger-url = "^/trigger/"
36
37##
38## URL Prefix of the proteced area.
39##
40trigger-before-download.download-url = "^/download/"
41
42##
43##
44## The deny url.
45##
46trigger-before-download.deny-url = "http://www.example.com/index.html"
47
48##
49## How long the "ticket" of the user will be valid.
50##
51## Value in seconds.
52##
53trigger-before-download.trigger-timeout = 10
54
55##
56## Normally the memcached key will be the remote ip of the request
57## If you store other data in the memcached aswell and want to avoid
58## key collisions you can configure a memcache-namespace.
59##
60## The key for the request will be memcache-namespace + remote_ip than.
61##
62#trigger-before-download.memcache-namespace = "t4bdl_"
63
64##
65## If set to 1, the module will log some debug informations.
66##
67#trigger-before-download.debug = 0
68
69##
70#######################################################################
71