Skip to content

ScaleCommerce/caddy-user-agent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UserAgent Parser

This Caddy Module allows to parse the user agent and provides essential device and bot detection.

You can access the information via this placeholder:

  • {user_agent.type} - Type string with possible values: bot, mobile, tablet, desktop

Priority: Bot detection has priority over device type. If a bot is detected, the type will be bot regardless of the device.

The module uses the parser from here.

Install

First, the xcaddy command:

$ go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest

Then build Caddy with this Go module plugged in. For example:

$ xcaddy build --with github.com/neodyme-labs/influx_log

About

Parses the user_agent field and splits it into it's components

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%