Unverified Commit ee2725f5 authored by Aman Mittal's avatar Aman Mittal Committed by GitHub

Update info on how to process webhooks by disabling bodyParser (#33909)

Explicitly mention disabling `bodyParser` when processing a webhook request. Uses the "webhook" keyword that becomes searchable in the docs for anyone running a search from the sidebar.

It addresses the issue [here](https://github.com/vercel/documentation/issues/71) and [this discussion](https://github.com/vercel/community/discussions/93).

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
parent 6dfe02d2
...@@ -34,7 +34,9 @@ export const config = { ...@@ -34,7 +34,9 @@ export const config = {
The `api` object includes all configs available for API routes. The `api` object includes all configs available for API routes.
`bodyParser` Enables body parsing, you can disable it if you want to consume it as a `Stream`: `bodyParser` is automatically enabled. If you want to consume the body as a `Stream` or with [`raw-body`](https://www.npmjs.com/package/raw-body), you can set this to `false`.
One use case for disabling the automatic `bodyParsing` is to allow you to verify the raw body of a **webhook** request, for example [from GitHub](https://docs.github.com/en/developers/webhooks-and-events/webhooks/securing-your-webhooks#validating-payloads-from-github).
```js ```js
export const config = { export const config = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment