Skip to content

Commit

Permalink
v.1.0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
findlabnet committed Apr 15, 2024
1 parent f3150a1 commit ac700da
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ When Backdrop served a cached page, the 'X-Backdrop-Cache: HIT' and 'cache-contr
To avoid such messages and incorrect module actions (in such cases can not get in time to reject blocked IP) you have two options:

- you can disable prefetching for cached pages: go to 'admin/config/development/performance' and within the 'Caching' fieldset uncheck the 'Use background fetch for cached pages' checkbox, then press the 'Save configuration' button;
- add the option '$settings['page_cache_invoke_hooks'] = TRUE;' to your 'settings.php' file.
- add the option '$settings['page_cache_invoke_hooks'] = TRUE;' to your 'settings.php' file.

Disabling prefetching for cached pages (first option) is sufficient to avoid such collisions in most cases.

Expand Down
5 changes: 5 additions & 0 deletions css/ip_blocking.admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,9 @@
margin-block-start: 1.35rem;
margin-inline-end: 0;
}

table td {
min-width: 8rem;
max-width: 34rem;
}
}
2 changes: 1 addition & 1 deletion ip_blocking.info
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ package = Spam control
backdrop = 1.x
type = module
configure = admin/config/people/ip-blocking
version = 1.0.16
version = 1.0.17
2 changes: 1 addition & 1 deletion ip_blocking.module
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function ip_blocking_block_ip($ip, $reason, $type) {
$log_enabled = $config->get('log_enabled');

if (backdrop_strlen($reason) > 250) {
$reason_dec = 'Request: ' . substr(urldecode($reason), 0, 250) . ' ... ';
$reason_dec = 'Request: ' . substr(urldecode($reason), 0, 245) . ' ... ';
}
else {
$reason_dec = 'Request: ' . urldecode($reason);
Expand Down

0 comments on commit ac700da

Please sign in to comment.