Files
traefik-botfilter/matcher.go
T

18 lines
275 B
Go

package botfilter
import (
"net/http"
"strings"
)
type matchResult struct {
points int
forceBan bool
reason string
}
func inspectRequest(r *http.Request, cfg *compiledConfig) matchResult {
paths := requestPaths(r)
userAgent := strings.TrimSpace(r.UserAgent())