File tree 3 files changed +11
-0
lines changed
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,9 @@ sub call {
66
66
my $self = shift ;
67
67
my $env = shift ;
68
68
69
+ # #Enable size limiting
70
+ $env -> {' psgix.harakiri' } = 1;
71
+
69
72
my $session = $env -> {' webgui.session' }
70
73
or die ' Missing WebGUI Session - check WebGUI::Middleware::Session' ;
71
74
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ BEGIN
184
184
checkModule(' common::sense' , ' 3.2' );
185
185
checkModule(' Geo::Coder::Googlev3' , ' 0.07' );
186
186
checkModule(' IO::File::WithPath' , );
187
+ checkModule(' Plack::Middleware::SizeLimit' , );
187
188
188
189
failAndExit(" Required modules are missing, running no more checks." ) if $missingModule ;
189
190
Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ builder {
8
8
my $config = $wg -> config;
9
9
my $streaming_uploads = $config -> get(' enableStreamingUploads' ); # have to restart for changes to this to take effect
10
10
11
+ if (! $^O eq ' darwin' ) {
12
+ enable ' Plack::Middleware::SizeLimit' => (
13
+ max_unshared_size => 200_000,
14
+ max_process_size => 500_000,
15
+ check_every_n_requests => 3,
16
+ );
17
+ }
11
18
enable ' Log4perl' , category => $config -> getFilename, conf => WebGUI::Paths-> logConfig;
12
19
enable ' SimpleContentFilter' , filter => sub {
13
20
if ( utf8::is_utf8($_ ) ) {
You can’t perform that action at this time.
0 commit comments