Skip to content

add config option to bypass BAD_ROBOTS list of user agents #5386

Open
BertKoor wants to merge 1 commit into
fisharebest:mainfrom
BertKoor:issue5376_allowUserAgents
Open

add config option to bypass BAD_ROBOTS list of user agents #5386
BertKoor wants to merge 1 commit into
fisharebest:mainfrom
BertKoor:issue5376_allowUserAgents

Conversation

@BertKoor

@BertKoor BertKoor commented May 28, 2026

Copy link
Copy Markdown
Contributor

Since the last release the $BAD_ROBOTS list (partial user agent strings) in BadBotBlocker is vastly extended.
Administrators do not have the ability yet to configure which of these bots they explicitly want or need to allow.

With this PR an entry allow_ua can be added in config.ini.php for allowing otherwise blocked robots.
The list is comma separated, entries are trimmed for spaces but case sensitive, eg:

allow_ua="Baiduspider, Google-InspectionTool, SeznamBot, Uptime-Kuma, Yandex"

If this is merged and released, this option needs to be documented in https://webtrees.net/admin/block/

this fixes issue #5376

…try `allow_ua` in config.ini.php

The list is comma separated, entries are trimmed for spaces but case sensitive, eg:
```
allow_ua="Baiduspider, SeznamBot, Uptime-Kuma, Yandex"
```
@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.49%. Comparing base (a64cc99) to head (8b016e3).
⚠️ Report is 122 commits behind head on main.

Files with missing lines Patch % Lines
app/Http/Middleware/BadBotBlocker.php 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5386      +/-   ##
============================================
- Coverage     35.49%   35.49%   -0.01%     
- Complexity    11211    11212       +1     
============================================
  Files          1166     1166              
  Lines         48077    48079       +2     
============================================
- Hits          17065    17064       -1     
- Misses        31012    31015       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant