You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom path to match requests against. Defaults to <code>/api/github/webhooks</code>.
589
-
</td>
590
-
</tr>
591
-
<tr>
592
-
<td>
593
-
<code>pathRegex</code>
594
-
<em>
595
-
RegEx
596
-
</em>
597
-
</td>
598
-
<td>
599
589
600
-
Custom path matcher. If set, overrides the <code>path</code> option.
601
-
Can be used as;
590
+
Can be used as a regular expression;
602
591
603
592
```js
604
-
constmiddleware=createNodeMiddleware(
605
-
webhooks,
606
-
{ pathRegex:/^\/api\/github\/webhooks/ }
607
-
);
593
+
constmiddleware=createNodeMiddleware(webhooks, {
594
+
path:/^\/api\/github\/webhooks/,
595
+
});
608
596
```
609
597
610
598
Test the regex before usage, the `g` and `y` flags [makes it stateful](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)!
611
599
612
600
</td>
613
-
</tr>
614
-
<tr>
615
-
<td>
616
-
<code>log</code>
617
-
<em>
618
-
object
619
-
</em>
620
-
</td>
621
-
<td>
601
+
</tr>
602
+
<tr>
603
+
<td>
604
+
<code>log</code>
605
+
<em>
606
+
object
607
+
</em>
608
+
</td>
609
+
<td>
622
610
623
611
Used for internal logging. Defaults to [`console`](https://developer.mozilla.org/en-US/docs/Web/API/console) with `debug` and `info` doing nothing.
0 commit comments