Identity Device
The Identity builtin device provides a canonical, request-scoped view of the client making a request. It resolves client identity once, early in the request lifecycle, and exposes it to downstream devices via a typed extension on the request context.
Configuration Example
Section titled “Configuration Example”identity_device = { enable = true
# IP Trust trusted_proxies = ["10.0.0.0/8"] max_x_forwarded_for_length = 1024
# Enable GeoIP... enable_geoip = true
# If GeoIP is enabled, # set one ore more MMDB databases (not included with Snakeway)... geoip_city_db = "/path/to/city.mmdb" geoip_isp_db = "/path/to/isp.mmdb" geoip_connection_type_db = "/path/to/connection_type.mmdb"
# Enable user agent enrichment... enable_user_agent = true # If user-agent parsing is enabled, # set an engine... ua_engine = "woothee" # or "uaparser" max_user_agent_length = 2048}User-Agent Parsing
Section titled “User-Agent Parsing”The default user-agent is Woothee. Woothee is a fast policy-based user agent parser.
An alternate regex based ua_engine is available called UA Parser (“uaparser”).
UA Parser is slower than Woothee, but possibly more accurate.