|
Luc Didry |
91e078 |
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
|
|
Luc Didry |
91e078 |
{
|
|
Luc Didry |
91e078 |
####################
|
|
Luc Didry |
91e078 |
# Hypnotoad settings
|
|
Luc Didry |
91e078 |
####################
|
|
Luc Didry |
91e078 |
# see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings
|
|
Luc Didry |
91e078 |
hypnotoad => {
|
|
Luc Didry |
91e078 |
# array of IP addresses and ports you want to listen to
|
|
Luc Didry |
14bc04 |
listen => ['http://127.0.0.1:8081'],
|
|
Luc Didry |
abd575 |
# if you use Lufi behind a reverse proxy like Nginx, you want ro set proxy to 1
|
|
Luc Didry |
abd575 |
# if you use Lufi directly, let it commented
|
|
Luc Didry |
abd575 |
#proxy => 1,
|
|
Luc Didry |
e7ca84 |
|
|
Luc Didry |
e7ca84 |
# Please read http://mojolicious.org/perldoc/Mojo/Server/Hypnotoad#workers
|
|
Luc Didry |
e7ca84 |
# to adjust this to your server
|
|
Luc Didry |
e7ca84 |
workers => 30,
|
|
Luc Didry |
e7ca84 |
clients => 1,
|
|
Luc Didry |
91e078 |
},
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
91e078 |
# put a way to contact you here and uncomment it
|
|
Luc Didry |
91e078 |
# MANDATORY
|
|
Luc Didry |
91e078 |
#contact => 'admin[at]example.com',
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
91e078 |
# array of random strings used to encrypt cookies
|
|
Luc Didry |
91e078 |
# optional, default is ['fdjsofjoihrei'], PLEASE, CHANGE IT
|
|
Luc Didry |
91e078 |
#secrets => ['fdjsofjoihrei'],
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
adf0a4 |
# choose a theme. See the available themes in `themes` directory
|
|
Luc Didry |
adf0a4 |
# optional, default is 'default'
|
|
Luc Didry |
adf0a4 |
#theme => 'default',
|
|
Luc Didry |
adf0a4 |
|
|
Luc Didry |
91e078 |
# length of the random URL
|
|
Luc Didry |
91e078 |
# optional, default is 8
|
|
Luc Didry |
91e078 |
#length => 8,
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
91e078 |
# how many URLs will be provisioned in a batch ?
|
|
Luc Didry |
91e078 |
# optional, default is 5
|
|
Luc Didry |
91e078 |
#provis_step => 5,
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
91e078 |
# max number of URLs to be provisioned
|
|
Luc Didry |
91e078 |
# optional, default is 100
|
|
Luc Didry |
91e078 |
#provisioning => 100,
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
91e078 |
# length of the modify/delete token
|
|
Luc Didry |
91e078 |
# optional, default is 32
|
|
Luc Didry |
91e078 |
#token_length => 32,
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
10a8dd |
# max file size, in octets
|
|
Luc Didry |
10a8dd |
# you can write it 100*1024*1024
|
|
Luc Didry |
10a8dd |
# optional, no default
|
|
Luc Didry |
10a8dd |
#max_file_size => 104857600,
|
|
Luc Didry |
10a8dd |
|
|
Luc Didry |
9430bd |
# if you want to have piwik statistics, provide a piwik image tracker
|
|
Luc Didry |
9430bd |
# only the image tracker is allowed, no javascript
|
|
Luc Didry |
9430bd |
# optional, no default
|
|
Luc Didry |
9430bd |
#piwik_img => 'https://piwik.example.org/piwik.php?idsite=1&rec=1',
|
|
Luc Didry |
9430bd |
|
|
Luc Didry |
d52dd6 |
# broadcast_message which will displayed on the index page
|
|
Luc Didry |
2f3877 |
# optional, no default
|
|
Luc Didry |
2f3877 |
#broadcast_message => 'Maintenance',
|
|
Luc Didry |
2f3877 |
|
|
Luc Didry |
91e078 |
# default time limit for files
|
|
Luc Didry |
91e078 |
# valid values are 0, 1, 7, 30 and 365
|
|
Luc Didry |
91e078 |
# optional, default is 0 (no limit)
|
|
Luc Didry |
91e078 |
#default_delay => 0,
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
91e078 |
# number of days after which the images will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
|
|
Luc Didry |
91e078 |
# a warning message will be displayed on homepage
|
|
Luc Didry |
91e078 |
# optional, default is 0 (no limit)
|
|
Luc Didry |
91e078 |
#max_delay => 0,
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
41cb17 |
# size thresholds: if you want to define max delays for different sizes of file
|
|
Luc Didry |
41cb17 |
# the keys are size in Bytes, you can't have 10*1000*10000 as key
|
|
Luc Didry |
be8c84 |
# if a file is smaller than the smallest configured size, it will have a expiration delay of max_delay (see above)
|
|
Luc Didry |
41cb17 |
# optional, default is using max_delay (see above) for all sizes
|
|
Luc Didry |
41cb17 |
#delay_for_size => {
|
|
Luc Didry |
41cb17 |
# 10000000 => 90, # between 10MB and 50MB => max is 90 days, less than 10MB => max is max_delay (see above)
|
|
Luc Didry |
41cb17 |
# 50000000 => 60, # between 50MB ans 1GB => max is 60 days
|
|
Luc Didry |
41cb17 |
# 1000000000 => 2, # more than 1GB => max is 2 days
|
|
Luc Didry |
077b92 |
#},
|
|
Luc Didry |
41cb17 |
|
|
Luc Didry |
088fb7 |
# URL sub-directory in which you want Lufi to be accessible
|
|
Luc Didry |
088fb7 |
# example: you want to have Lufi under https://example.org/lufi/
|
|
Luc Didry |
91e078 |
# => set prefix to '/lufi' or to '/lufi/', it doesn't matter
|
|
Luc Didry |
91e078 |
# optional, defaut is /
|
|
Luc Didry |
91e078 |
#prefix => '/',
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
91e078 |
# array of authorized domains for API calls.
|
|
Luc Didry |
91e078 |
# if you want to authorize everyone to use the API: ['*']
|
|
Luc Didry |
91e078 |
# optional, no domains allowed by default
|
|
Luc Didry |
91e078 |
#allowed_domains => ['http://1.example.com', 'http://2.example.com'],
|
|
Luc Didry |
91e078 |
|
|
Luc Didry |
91e078 |
# if set, the shortened URLs will use this domain
|
|
Luc Didry |
91e078 |
# optional
|
|
Luc Didry |
91e078 |
#fixed_domain => 'example.org',
|
|
Luc Didry |
ae8934 |
|
|
Luc Didry |
ae8934 |
# Mail configuration
|
|
Luc Didry |
ae8934 |
# See https://metacpan.org/pod/Mojolicious::Plugin::Mail#EXAMPLES
|
|
Luc Didry |
ae8934 |
# Optional, default to sendmail method with no arguments
|
|
Luc Didry |
ae8934 |
#mail => {
|
|
Luc Didry |
ae8934 |
# # Valid values are 'sendmail' and 'smtp'
|
|
Luc Didry |
ae8934 |
# how => 'smtp',
|
|
Luc Didry |
ae8934 |
# howargs => ['smtp.example.org']
|
|
Luc Didry |
ae8934 |
#},
|
|
Luc Didry |
ae8934 |
|
|
Luc Didry |
ae8934 |
# Email sender address
|
|
Luc Didry |
ae8934 |
# Optional, default to no-reply@lufi.io
|
|
Luc Didry |
fb140e |
#mail_sender => 'no-reply@lufi.io',
|
|
Luc Didry |
077b92 |
|
|
Luc Didry |
d909b8 |
# choose what database you want to use
|
|
Luc Didry |
d909b8 |
# valid choices are sqlite and postgresql (all lowercase)
|
|
Luc Didry |
d909b8 |
# optional, default is sqlite
|
|
Luc Didry |
d909b8 |
#dbtype => 'sqlite',
|
|
Luc Didry |
d909b8 |
|
|
Luc Didry |
d909b8 |
# SQLite ONLY - only used if dbtype is set to sqlite
|
|
Luc Didry |
077b92 |
# define a path to the SQLite database
|
|
Luc Didry |
077b92 |
# you can define it relative to lufi directory or set an absolute path
|
|
Luc Didry |
18499a |
# remember that it has to be in a directory writable by Lufi user
|
|
Luc Didry |
077b92 |
# optional, default is lufi.db
|
|
Luc Didry |
077b92 |
#db_path => 'lufi.db',
|
|
Luc Didry |
40deab |
|
|
Luc Didry |
d909b8 |
# PostgreSQL ONLY - only used if dbtype is set to postgresql
|
|
Luc Didry |
d909b8 |
# these are the credentials to access the PostgreSQL database
|
|
Luc Didry |
d909b8 |
# mandatory if you choosed postgresql as dbtype
|
|
Luc Didry |
d909b8 |
#pgdb => {
|
|
Luc Didry |
d909b8 |
# database => 'lufi',
|
|
Luc Didry |
d909b8 |
# host => 'localhost',
|
|
Luc Didry |
d909b8 |
# #user => 'DBUSER',
|
|
Luc Didry |
d909b8 |
# #pwd => 'DBPASSWORD'
|
|
Luc Didry |
d909b8 |
#},
|
|
Luc Didry |
d909b8 |
|
|
Luc Didry |
f94ae4 |
# define a path to the upload directory, where the uploaded files will be stored
|
|
Luc Didry |
f94ae4 |
# you can define it relative to lufi directory or set an absolute path
|
|
Luc Didry |
f94ae4 |
# remember that it has to be in a directory writable by Lufi user
|
|
Luc Didry |
f94ae4 |
# DO NOT CHANGE THIS IF FILES HAVE BEEN ALREADY UPLOADED: THEY WILL NOT BE DOWNLOADABLE ANYMORE
|
|
Luc Didry |
f94ae4 |
# optional, default is 'files'
|
|
Luc Didry |
f94ae4 |
#upload_dir => 'files',
|
|
Luc Didry |
f94ae4 |
|
|
Luc Didry |
ac8d76 |
# set `ldap` if you want that only authenticated users can upload files
|
|
Luc Didry |
ac8d76 |
# please note that everybody can still download files
|
|
Luc Didry |
ac8d76 |
# optional, no default
|
|
Luc Didry |
ac8d76 |
#ldap => {
|
|
Luc Didry |
ac8d76 |
# uri => 'ldaps://ldap.example.org',
|
|
Luc Didry |
ac8d76 |
# user_tree => 'ou=users,dc=example,dc=org',
|
|
Luc Didry |
ac8d76 |
# bind_dn => ',ou=users,dc=example,dc=org',
|
|
Luc Didry |
ac8d76 |
# bind_user => 'uid=ldap_user',
|
|
Luc Didry |
ac8d76 |
# bind_pwd => 'secr3t',
|
|
Luc Didry |
ac8d76 |
# user_filter => '!(uid=ldap_user)'
|
|
Luc Didry |
ac8d76 |
#},
|
|
Luc Didry |
ac8d76 |
|
|
Yann |
dbdaff |
# set `htpasswd` if you want to use an htpasswd file instead of ldap
|
|
Yann |
dbdaff |
# see 'man htpasswd' to know how to create such file
|
|
Yann |
dbdaff |
#htpasswd => 'lufi.passwd',
|
|
Yann |
dbdaff |
|
|
Armando Lüscher |
c3e7a2 |
# if you've set ldap above, the session will last `session_duration` seconds before
|
|
Luc Didry |
ac8d76 |
# the user needs to reauthenticate
|
|
Luc Didry |
ac8d76 |
# optional, default is 3600
|
|
Luc Didry |
ac8d76 |
#session_duration => 3600,
|
|
Luc Didry |
ac8d76 |
|
|
Luc Didry |
50b1f0 |
# allow to add a password on files, asked before allowing to download files
|
|
Luc Didry |
50b1f0 |
# optional, default to 0
|
|
Luc Didry |
50b1f0 |
#allow_pwd_on_files => 0,
|
|
Luc Didry |
50b1f0 |
|
|
Luc Didry |
40deab |
#########################
|
|
Luc Didry |
40deab |
# Lufi cron jobs settings
|
|
Luc Didry |
40deab |
#########################
|
|
Luc Didry |
40deab |
|
|
Luc Didry |
40deab |
# number of days senders' IP addresses are kept in database
|
|
Luc Didry |
40deab |
# after that delay, they will be deleted from database (used with script/lufi cron cleanbdd)
|
|
Luc Didry |
40deab |
# optional, default is 365
|
|
Luc Didry |
40deab |
#keep_ip_during => 365,
|
|
Luc Didry |
40deab |
|
|
Luc Didry |
40deab |
# max size of the files directory, in octets
|
|
Luc Didry |
40deab |
# used by script/lufi cron watch to trigger an action
|
|
Luc Didry |
40deab |
# optional, no default
|
|
Luc Didry |
40deab |
#max_total_size => 10*1024*1024*1024,
|
|
Luc Didry |
40deab |
|
|
Luc Didry |
40deab |
# default action when files directory is over max_total_size (used with script/lufi cron watch)
|
|
Luc Didry |
40deab |
# valid values are 'warn', 'stop-upload' and 'delete'
|
|
Luc Didry |
40deab |
# please, see readme
|
|
Luc Didry |
40deab |
# optional, default is 'warn'
|
|
Luc Didry |
40deab |
#policy_when_full => 'warn',
|
|
Luc Didry |
40deab |
|
|
Luc Didry |
40deab |
# images which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
|
|
Luc Didry |
40deab |
# if delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted
|
|
Luc Didry |
40deab |
# optional, no default
|
|
Luc Didry |
ac8d76 |
#delete_no_longer_viewed_files => 90,
|
|
Luc Didry |
ae8934 |
};
|