No description
Find a file
Daniel Gorbe a9d615f573
All checks were successful
go test / go-test (push) Successful in 4m32s
Go Report Card / generate-report (push) Successful in 32s
pkg.go.dev / pull-new-commit (push) Successful in 7m46s
Move to Forgejo Runner
2025-10-10 21:17:50 +02:00
.github/workflows Move to Forgejo Runner 2025-10-10 21:17:50 +02:00
.gitignore Create the crawler module 2025-07-28 02:32:30 +02:00
crawler.go Update docs 2025-07-28 07:11:51 +02:00
go.mod Create the crawler module 2025-07-28 02:32:30 +02:00
go.sum Create the crawler module 2025-07-28 02:32:30 +02:00
LICENSE Initial commit 2025-07-26 15:11:59 +02:00
README.md Add a note about the Github mirror 2025-07-29 17:19:27 +02:00

crawler

Go Reference Go Report Card

Note

This repository is mirorred to github.com/g0rbe/caddy-crawler

Usage

example.com {

    @is-crawler crawler
    respond @is-crawler "Crawler detected"

    ...
}

Build

xcaddy build --with git.gorbe.io/caddy/crawler

Or just copy the build argument

--with git.gorbe.io/caddy/crawler

Logging

Log "crawler detected" and the User-Agent used in the request to INFO level.

Go module

go get git.gorbe.io/caddy/crawler@latest

Get the latest commit (if Go module proxy is not updated):

go get "git.gorbe.io/caddy/crawler@$(curl -s 'https://git.gorbe.io/api/v1/repos/caddy/crawler/commits' | jq -r '.[0].sha')"