Skip to content

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

License

Notifications You must be signed in to change notification settings

neodyme-labs/user_agent_parse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UserAgent Parser

This Caddy Module allows to parse the user agent and splits it into it's components.

You can access the components via these placeholders:

  • {user_agent.name}
  • {user_agent.version}
  • {user_agent.os}
  • {user_agent.os_version}
  • {user_agent.device}
  • {user_agent.mobile}
  • {user_agent.tablet}
  • {user_agent.desktop}
  • {user_agent.bot}
  • {user_agent.url}

The module is 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

Packages

No packages published

Languages