user_agent_parse

package module
v0.0.0-...-86c1c5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2025 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAgentParse

type UserAgentParse struct {
	// contains filtered or unexported fields
}

func (UserAgentParse) CaddyModule

func (UserAgentParse) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*UserAgentParse) Provision

func (l *UserAgentParse) Provision(ctx caddy.Context) error

func (*UserAgentParse) ServeHTTP

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址