go-githubapp icon indicating copy to clipboard operation
go-githubapp copied to clipboard

404 page not found

Open tekumara opened this issue 2 years ago • 2 comments

when creating a github app on github.com for the example and running:

go run ./example

web hook delivery fails with 404 page not found

tekumara avatar Jul 17 '22 12:07 tekumara

Looks like this because of the line:

http.Handle(githubapp.DefaultWebhookRoute, handler)

which expects requests at /api/github/hook whereas my app on github.com was configured to post to /.

This makes it work:

http.Handle("/", handler)

tekumara avatar Jul 17 '22 12:07 tekumara

Hey @tekumara,

As you noticed, this is expected based on the code. I think we need to update our docs to reflect that you should point the github app's webhook configuration to myapp.domain/api/github/hook.

asvoboda avatar Jul 17 '22 21:07 asvoboda