$msg=$c->l('The shortened text can contain only numbers, letters and the - and _ character, can\'t be "a", "api" or "stats" or end with ".json". Your URL to shorten: [_1]',$url);
$msg=$c->l('The shortened text can contain only numbers, letters and the - and _ character, can\'t be "a", "api" or "stats" or end with ".json". Your URL to shorten: %1',$url);
}elsif(defined($custom_url)&&LstuModel::Lstu->count('WHERE short = ?',$custom_url)>0){
}elsif(defined($custom_url)&&LstuModel::Lstu->count('WHERE short = ?',$custom_url)>0){
$msg=$c->l('The shortened text ([_1]) is already used. Please choose another one.',$custom_url);
$msg=$c->l('The shortened text (%1) is already used. Please choose another one.',$custom_url);
# array of IP addresses and ports you want to listen to
# array of IP addresses and ports you want to listen to
listen=>['http://127.0.0.1:8080'],
listen=>['http://127.0.0.1:8080'],
# user and group you want for Lstu to run with
# if you use Lstu behind a reverse proxy like Nginx, you want to set proxy to 1
# be sure that this user/group have rights on the lstu directory
# if you use Lstu directly, let it commented
# if you launch lstu from a different user, be sure that this user have the right to su this user/group
#proxy => 1,
# => if current_user is not the user that you sets here and is not root, there's chances that it will fail (see https://github.com/ldidry/lstu/issues/25)
user=>'www-data',
group=>'www-data'
},
},
# put a way to contact you here and uncomment it
# put a way to contact you here and uncomment it
...
@@ -27,6 +24,10 @@
...
@@ -27,6 +24,10 @@
# optional, but you won't have access to admin /stats if not set
# optional, but you won't have access to admin /stats if not set
#adminpwd => 's3cr3T',
#adminpwd => 's3cr3T',
# choose a theme. See the available themes in `themes` directory
# optional, default is 'default'
#theme => 'default',
# number of URLs to be displayed per page in /stats
# number of URLs to be displayed per page in /stats
# optional, default is 10
# optional, default is 10
#page_offset => 10,
#page_offset => 10,
...
@@ -57,4 +58,10 @@
...
@@ -57,4 +58,10 @@
# if set, the shortened URLs will use this domain
# if set, the shortened URLs will use this domain
# optional
# optional
#fixed_domain => 'example.org',
#fixed_domain => 'example.org',
# define a path to the SQLite database
# you can define it relative to lstu directory or set an absolute path
# remember that it has to be in a directory writable by Lstu user