Skip to main content

Module ua_restriction

Module ua_restriction 

Source
Expand description

User-Agent allow/deny list plugin (ua-restriction).

Port of APISIX’s ua-restriction: matches the request’s User-Agent header against a list of regexes — either an allowlist (only matching agents pass) or a denylist (matching agents are rejected). Rejections are routed through the node’s error port with error code UA_RESTRICTED.

Structs§

UaRestrictionPlugin
Restricts access based on the User-Agent request header.

Functions§

parse_regex_list 🔒
Parses a config key as an array of non-empty regex strings, compiling each at config load. An absent key yields an empty list.