Skip to content

Commit 57ee55c

Browse files
committed
upd
1 parent 32275ed commit 57ee55c

File tree

7 files changed

+29
-3
lines changed

7 files changed

+29
-3
lines changed

.changeset/gold-bulldogs-enjoy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"basehub": patch
3+
---
4+
5+
type nit

.changeset/pre.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"fluffy-sloths-admire",
1919
"forty-bees-wash",
2020
"four-lies-travel",
21+
"gold-bulldogs-enjoy",
2122
"good-worms-jam",
2223
"great-flies-wonder",
2324
"hip-terms-tie",

packages/basehub/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# basehub
22

3+
## 8.0.0-canary.42
4+
5+
### Patch Changes
6+
7+
- type nit
8+
39
## 8.0.0-canary.41
410

511
### Patch Changes

packages/basehub/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "basehub",
33
"description": "A very fast Headless CMS.",
44
"author": "JB <[email protected]>",
5-
"version": "8.0.0-canary.41",
5+
"version": "8.0.0-canary.42",
66
"license": "MIT",
77
"repository": "basehub-ai/basehub",
88
"bugs": "https://github.com/basehub-ai/basehub/issues",

packages/basehub/src/workflows/primitive.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const authenticateWebhook = async <
4747
* The signature of the incoming webhook request—you get this via request.headers["x-basehub-webhook-signature"]
4848
* This should be a hex-encoded HMAC SHA-256 hash of the request body
4949
*/
50-
signature: string;
50+
signature: string | null | Headers;
5151
/**
5252
* The secret used for verifying the incoming webhook request—you get this via the BaseHub API
5353
* This secret should never be exposed in requests or responses
@@ -58,6 +58,13 @@ export const authenticateWebhook = async <
5858
| { success: false; error: string }
5959
> => {
6060
try {
61+
if (signature && typeof signature === "object") {
62+
signature = signature.get("x-basehub-webhook-signature");
63+
}
64+
if (!signature) {
65+
return { success: false, error: "Signature is required" };
66+
}
67+
6168
// Handle different body types
6269
let rawBody: string;
6370
let parsedBody: unknown;

playground/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# playground
22

3+
## 0.0.164-canary.42
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
9+
310
## 0.0.164-canary.41
411

512
### Patch Changes

playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "playground",
33
"private": true,
4-
"version": "0.0.164-canary.41",
4+
"version": "0.0.164-canary.42",
55
"scripts": {
66
"dev": "basehub dev & next dev --port 3003",
77
"build": "basehub && next build",

0 commit comments

Comments
 (0)