Requirements
- Omeka S 4.0 or later
- PHP 8.1 or later
- MySQL 5.7+ or MariaDB 10.3+ (the event table uses a
JSONcolumn and the rate limiter usesINSERT ... ON DUPLICATE KEY UPDATE)
The module has no external dependencies and does not call any outside service.
Installing
- Copy the
TrafficGuardfolder into your Omeka Smodules/directory. - Log in to the Omeka S admin panel as a Global Administrator.
- Go to Admin > Modules and click Install next to Traffic Guard.
Installation creates five database tables and writes the default settings:
| Table | Purpose |
|---|---|
tg_rate_windows |
Per-IP request counters for each 60-second window |
tg_bans |
Automatic and manual IP bans |
tg_events |
Log of throttle and block decisions |
tg_ua_rules |
User-agent allow and block rules |
tg_ip_allowlist |
IP addresses and CIDR ranges exempt from all checks |
Protection is active as soon as the module is installed, in Normal mode with the default limits. A Traffic Guard entry appears in the admin sidebar under Modules, linking to the dashboard at /admin/traffic-guard. See Configuration for the defaults and how to change them.
Upgrading
Copy the new version over the existing modules/TrafficGuard folder, then visit Admin > Modules. If the module shows Upgrade available, click Upgrade. No database migrations have been needed so far.
Uninstalling
Go to Admin > Modules and click Uninstall next to Traffic Guard. Uninstalling:
- drops all five
tg_*tables, which removes every ban, event, user-agent rule and allowlist entry, and - deletes every
traffic_guard_*entry from Omeka's global settings.
No other Omeka data is touched.
If the module cannot be uninstalled from the admin panel, drop the tables manually and remove the module directory:
DROP TABLE IF EXISTS tg_ip_allowlist;
DROP TABLE IF EXISTS tg_ua_rules;
DROP TABLE IF EXISTS tg_events;
DROP TABLE IF EXISTS tg_bans;
DROP TABLE IF EXISTS tg_rate_windows;