Skip to content

Commit 1badc73

Browse files
committed
docs(webhooks): add signature verification tip and fix TS config path
1 parent afa9417 commit 1badc73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docusaurus/docs/cms/backend-customization/webhooks.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export default {
7373
Most of the time, webhooks make requests to public URLs, therefore it is possible that someone may find that URL and send it wrong information.
7474

7575
To prevent this from happening you can send a header with an authentication token. Using the Admin panel you would have to do it for every webhook.
76+
Consider signing webhook payloads and verifying signatures server‑side to prevent replay attacks.
7677
Another way is to define `defaultHeaders` to add to every webhook request.
7778

7879
You can configure these global headers by updating the file at `./config/server`:
@@ -98,7 +99,7 @@ module.exports = {
9899

99100
<TabItem value="ts" label="TypeScript">
100101

101-
```js title="./config.server.ts"
102+
```js title="./config/server.ts"
102103
export default {
103104
webhooks: {
104105
defaultHeaders: {
@@ -514,4 +515,4 @@ The event is triggered when a [release](/cms/features/releases) is published.
514515

515516
:::tip
516517
If you want to learn more about how to use webhooks with Next.js, please have a look at the [dedicated blog article](https://strapi.io/blog/how-to-create-an-ssg-static-site-generation-application-with-strapi-webhooks-and-nextjs).
517-
:::
518+
:::

0 commit comments

Comments
 (0)