File tree Expand file tree Collapse file tree 7 files changed +29
-3
lines changed Expand file tree Collapse file tree 7 files changed +29
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " basehub " : patch
3
+ ---
4
+
5
+ type nit
Original file line number Diff line number Diff line change 18
18
" fluffy-sloths-admire" ,
19
19
" forty-bees-wash" ,
20
20
" four-lies-travel" ,
21
+ " gold-bulldogs-enjoy" ,
21
22
" good-worms-jam" ,
22
23
" great-flies-wonder" ,
23
24
" hip-terms-tie" ,
Original file line number Diff line number Diff line change 1
1
# basehub
2
2
3
+ ## 8.0.0-canary.42
4
+
5
+ ### Patch Changes
6
+
7
+ - type nit
8
+
3
9
## 8.0.0-canary.41
4
10
5
11
### Patch Changes
Original file line number Diff line number Diff line change 2
2
"name" : " basehub" ,
3
3
"description" : " A very fast Headless CMS." ,
4
4
"author" :
" JB <[email protected] >" ,
5
- "version" : " 8.0.0-canary.41 " ,
5
+ "version" : " 8.0.0-canary.42 " ,
6
6
"license" : " MIT" ,
7
7
"repository" : " basehub-ai/basehub" ,
8
8
"bugs" : " https://github.com/basehub-ai/basehub/issues" ,
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export const authenticateWebhook = async <
47
47
* The signature of the incoming webhook request—you get this via request.headers["x-basehub-webhook-signature"]
48
48
* This should be a hex-encoded HMAC SHA-256 hash of the request body
49
49
*/
50
- signature : string ;
50
+ signature : string | null | Headers ;
51
51
/**
52
52
* The secret used for verifying the incoming webhook request—you get this via the BaseHub API
53
53
* This secret should never be exposed in requests or responses
@@ -58,6 +58,13 @@ export const authenticateWebhook = async <
58
58
| { success : false ; error : string }
59
59
> => {
60
60
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
+
61
68
// Handle different body types
62
69
let rawBody : string ;
63
70
let parsedBody : unknown ;
Original file line number Diff line number Diff line change 1
1
# playground
2
2
3
+ ## 0.0.164-canary.42
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+
3
10
## 0.0.164-canary.41
4
11
5
12
### Patch Changes
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " playground" ,
3
3
"private" : true ,
4
- "version" : " 0.0.164-canary.41 " ,
4
+ "version" : " 0.0.164-canary.42 " ,
5
5
"scripts" : {
6
6
"dev" : " basehub dev & next dev --port 3003" ,
7
7
"build" : " basehub && next build" ,
You can’t perform that action at this time.
0 commit comments