Search by

maikschneider / solr-shield

m.schneider

Protects the Apache Solr search endpoint of TYPO3 from bots and crawlers that enumerate search parameters.

Package info

github.com/maikschneider/solr-shield

Homepage

Documentation

Type:typo3-cms-extension

pkg:composer/maikschneider/solr-shield

Statistics

Installs: 132

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 2

1.0.1 2026-10-23 16:04 UTC

README

Extension icon

TYPO3 extension solr_shield

Supported PHP versions Tests CGL Coverage License

Protects the EXT:solr search endpoint from bots and crawlers that enumerate tx_solr[…] parameters to generate thousands of unique, uncacheable requests.

Before: /search?tx_solr[q]=foo&tx_solr[filter][0]=type:pages&tx_solr[page]=2
After:  /search?_ss=eyJwIjoidHhfc29sciU1QnElNUQ9…

✨ Features

  • Facet, pagination, sorting and other typolink() links carry one signed _ss parameter instead of tx_solr[…]
  • Search form fields are renamed in the rendered HTML and get a signed hidden field, so search works without JavaScript
  • Unsigned tx_solr requests and suggest requests are answered with 403, or redirected back on the same site
  • No template changes, configured per site
  • Optional bot detection: a small script scores mouse, touch, scroll and key activity, and requests that fail its checks are rejected, which raises the cost of scripted crawling

Note

Bot detection is off by default. With solrShield.botDetection.enabled, visitors without JavaScript can no longer search.

🔥 Installation

composer require maikschneider/solr-shield

Add the site set Solr Shield (maikschneider/solr-shield) to your site, then flush all caches.

Dependency Version
PHP ^8.2
TYPO3 ^13.4 || ^14.3
EXT:solr ^13.0 || ^14.0

⚙️ Configuration

# config/sites/<site>/settings.yaml
solrShield:
  uriObfuscation:
    enabled: true
    rejectAction: '403'  # or redirect

📙 Documentation

How the signed parameter, the form rewrite and the middleware work, plus known limitations: docs.typo3.org.

🧑‍💻 Contributing

See CONTRIBUTING.md.

⭐ License

This project is licensed under GNU General Public License 2.0 (or later).