Files
supabase/apps/studio/lib/api/edgeFunctions.ts
Jordi Enric 9e72050658 Add regex guard for edge functions test endpoint (#35688)
* Add regex guard for edge functions test endpoint

* Remove conosle log

* add tests

* empty

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-05-15 08:57:06 +00:00

8 lines
221 B
TypeScript

export const isValidEdgeFunctionURL = (url: string) => {
const regexValidEdgeFunctionURL = new RegExp(
'^https://[a-z]*.supabase.(red|co)/functions/v[0-9]{1}/.*$'
)
return regexValidEdgeFunctionURL.test(url)
}