Anubis module for Caddy

add example to readme

kot.pink 8a7265d6 5c08d7e5

verified
Changed files
+32
+32
README.md
···
--replace github.com/TecharoHQ/anubis=github.com/kotx/anubis-static@v1.23.1
# ...any other plugins
```
+
+
## Example config
+
+
```Caddyfile
+
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
+
}
+
```