Skip to content

按照介绍的配置 route /webhook 一直报错404,日志中输出 ERROR http.handlers.webhook repository not setup #3

Description

@c588

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
image
最后想着看一下 caddy2 的 route 是怎么使用的,就多加了一段

route /route_test {
  redir https://baidu.com
}

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions