fixup gitignore and eval

This commit is contained in:
Rawley Fowler 2023-03-11 11:47:57 -06:00
parent eb36df7104
commit 3dea47bbd4
3 changed files with 10 additions and 4 deletions

2
.gitignore vendored
View file

@ -13,3 +13,5 @@ MANIFEST*
META.*/
MYMETA.*
pm_to_blib
sakisafe.log
f/

View file

@ -1,3 +1,5 @@
use v5.36;
use ExtUtils::MakeMaker;
WriteMakefile(
@ -7,7 +9,9 @@ WriteMakefile(
"List::MoreUtils" => 0,
"Term::ANSIColor" => 0,
"MIME::Types" => 0,
"Path::Tiny" => 0
"Path::Tiny" => 0,
"Mojolicious::Plugin::RenderFile" => 0,
"Mojolicious::Routes::Pattern" => 0
},
EXE_FILES => ['sakisafe.pl']
);

View file

@ -22,7 +22,7 @@ pledge("stdio cpath rpath wpath inet flock fattr") if $^O eq "openbsd";
my $MAX_SIZE = 1024 * 1024 * 100;
my @BANNED = path('banned.txt')->slurp_utf8 || qw(); # Add banned IP addresses here
my @BANNED = eval { path('banned.txt')->slurp_utf8 } or qw(); # Add banned IP addresses here
my $dirname;
my $link;
@ -119,8 +119,8 @@ get '/f/:dir/#name' => sub ($c) {
content_disposition => 'inline'
);
}
;
};
app->max_request_size( 1024 * 1024 * 100 );
post '/upload' => sub ($c) { handle_file($c) };