2022-11-17 06:24:13 +13:00
|
|
|
import { BBContext } from "@budibase/types"
|
|
|
|
|
2021-11-04 03:08:47 +13:00
|
|
|
const WEBHOOK_ENDPOINTS = new RegExp(
|
|
|
|
["webhooks/trigger", "webhooks/schema"].join("|")
|
|
|
|
)
|
|
|
|
|
2022-11-17 06:24:13 +13:00
|
|
|
export function isWebhookEndpoint(ctx: BBContext) {
|
2021-11-04 03:08:47 +13:00
|
|
|
return WEBHOOK_ENDPOINTS.test(ctx.request.url)
|
|
|
|
}
|