GitbookIO / nuts

:chestnut: Releases/downloads server with auto-updater and GitHub as a backend
http://nuts.gitbook.com
Apache License 2.0
1.25k stars 300 forks source link

setting content type for github webhook #145

Open choxi opened 7 years ago

choxi commented 7 years ago

GitHub sends webhooks with an "application/x-www-form-urlencoded" by default, but this crashes the nuts server because it's excepting the content type to be "application/json". There's a dropdown to change the content type, but since there's no error message in the Heroku logs it was a little tricky to track down why the webhook wasn't working:

github config

It'd be helpful to include this information in the docs so others don't get blocked by the same problem.

AaronO commented 7 years ago

@choxi Maybe the better fix would be for nuts to support both encodings, that would make more sense and be less error prone.

(Assuming the x-www-form-urlencoded isn't lacking any info or annoying to parse)

loprima-l commented 1 year ago

Hi, I merged the project to a new repo to start maintain it, I would be glad if you can put your pull request here : https://github.com/loprima-l/nuts-2