Caddyfile
:80 {
encode zstd gzip
log {
output file /var/log/access.log
}
root * /data/blog
file_server
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
handle @404 {
rewrite * /404.html
file_server
}
}
route /webhook {
webhook {
repo "https://github.com/c588/hugoblog.git"
branch main
path /data/blog
secret ******
}
}
}
但是使用 GitHub webhook 都是404

最后想着看一下 caddy2 的 route 是怎么使用的,就多加了一段
route /route_test {
redir https://baidu.com
}
结果发现可以正常使用了

但是我看 caddy-webhook 的介绍和另外一位朋友提的 issue 中的配置都是直接写的 route /webhook 并且可以正常使用,所以来问一下,希望作者大大可以解答一下我的迷惑,感谢 :D