test: cover the encoded scan-path case with the rule it expects to match
ci / middleware (go) (push) Canceled after 0s
ci / py-monitor (python) (push) Canceled after 0s
ci / java-cache (maven) (push) Canceled after 0s
ci / shell-sync (syntax) (push) Canceled after 0s

This commit is contained in:
hoelee committed 2026-11-18 09:06:34 +08:00
1 parent b5e7143742
commit de280a2fd9
39 files changed
+2703 -1

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
# Dynamic configuration. Start a backend on 127.0.0.1:8081, then request
# http://example.localhost/ through Traefik to exercise the middleware.
http:
routers:
example:
rule: Host(`example.localhost`)
entryPoints:
- web
middlewares:
- botfilter
service: example-backend
middlewares:
botfilter:
plugin:
botfilter:
requireUserAgent: true
requireAccept: true
browserValidation: true
temporaryBanMinutes: 15
scoreThreshold: 100
scoreWindowMinutes: 15
blockedUserAgents:
- sqlmap
- nikto
- masscan
blockedPaths:
- /.env
- /.git
- /wp-login.php
- /xmlrpc.php
- /phpmyadmin
blockedExtensions:
- .env
- .bak
- .zip
logBlockedRequests: true
services:
example-backend:
loadBalancer:
servers:
- url: http://127.0.0.1:8081
+16
View File
@@ -0,0 +1,16 @@
# Static Traefik configuration for testing the plugin from a local checkout.
entryPoints:
web:
address: ":80"
providers:
file:
filename: /etc/traefik/dynamic.yml
api:
dashboard: true
experimental:
localPlugins:
botfilter:
moduleName: github.com/hoelee/traefik-botfilter