File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,13 +109,16 @@ sub allow {
109109 Data::Throttler-> import ();
110110
111111 my $interval = 90;
112- my $max_items = 15;
112+ my $max_items = 30;
113+ my $db_file = File::Spec-> catfile($info -> tmpdir(), ' throttle' );
113114 if (my $config = $args {config }) {
114- $interval = $config -> {' security' }-> {' rate_limiting' }-> {' time_window' } || 90;
115- $max_items = $config -> {' security' }-> {' rate_limiting' }-> {' max_requests' } || 15;
115+ if (my $throttle = $config -> {throttle }) {
116+ $db_file = $throttle -> {' file' } // File::Spec-> catdir($info -> tmpdir(), ' throttle' );
117+ $max_items = $throttle -> {' max_items' } // 30; # Allow 30 requests
118+ $interval = $throttle -> {' interval' } // 90; # Per 90 second window
119+ }
116120 }
117121 # Handle YAML Errors
118- my $db_file = File::Spec-> catfile($info -> tmpdir(), ' throttle' );
119122 eval {
120123 my $throttler = Data::Throttler-> new(
121124 max_items => $max_items ,
You can’t perform that action at this time.
0 commit comments