mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
fix(dispatch): enforce match criteria for fallback routes
This commit is contained in:
1 file changed
+1
-1
@@ -33,7 +33,7 @@ export async function dispatchEvent(config: Config, event: WebhookEvent, env: En
|
|||||||
const tasks = config.routes
|
const tasks = config.routes
|
||||||
.filter((route) => {
|
.filter((route) => {
|
||||||
if (!accepted(route)) return false;
|
if (!accepted(route)) return false;
|
||||||
if (route.fallback) return !anyRegularMatched;
|
if (route.fallback) return !anyRegularMatched && matchRoute(route, event);
|
||||||
return matchRoute(route, event);
|
return matchRoute(route, event);
|
||||||
})
|
})
|
||||||
.map(async (route) => {
|
.map(async (route) => {
|
||||||
|
|||||||
Reference in new issue
Block a user