caddy_anubis

package module
v0.0.0-...-ad73e67 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: Zlib Imports: 13 Imported by: 0

README

caddy-anubis

You can add caddy-anubis to your server using xcaddy:

xcaddy build \
  --with tangled.sh/kot.pink/caddy-anubis@main \
  --replace github.com/TecharoHQ/anubis=github.com/kotx/[email protected]
  # ...any other plugins

Example config

localhost {
	@anubis {
		# This matcher allows you to select specific paths for Anubis to handle.
		# If you want to handle all paths, remove this block and use `anubis {...}` instead!
		path / # don't let AI scrapers browse the file index
		path /.within.website/* # required for anubis to work

		not path /api/* # exclude api routes from anubis
	}

	log http.handlers.anubis {
		level DEBUG # optionally set log level
	}

	anubis @anubis {
		# This setting gets overridden a lot by the default bot policy.
		difficulty 4

		# Custom bot policy file
		policy_fname botPolicies.yaml

		private_key {$ED25519_PRIVATE_KEY} # for challenge persistence across restarts
										   # or if you're running multiple anubis instances
	}

	file_server browse
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnubisMiddleware

type AnubisMiddleware struct {
	Options           libanubis.Options `json:"options"`
	PolicyFname       string            `json:"policy_fname,omitempty"`
	DefaultDifficulty int               `json:"default_difficulty,omitempty"`
	// contains filtered or unexported fields
}

func (AnubisMiddleware) CaddyModule

func (AnubisMiddleware) CaddyModule() caddy.ModuleInfo

func (*AnubisMiddleware) Provision

func (m *AnubisMiddleware) Provision(ctx caddy.Context) error

func (*AnubisMiddleware) ServeHTTP

func (*AnubisMiddleware) UnmarshalCaddyfile

func (m *AnubisMiddleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

Source Files

  • caddy_anubis.go

Jump to

Keyboard shortcuts

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