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