mirror of
https://github.com/supabase/supabase.git
synced 2026-05-23 19:13:13 +08:00
* Add regex guard for edge functions test endpoint * Remove conosle log * add tests * empty --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
8 lines
221 B
TypeScript
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)
|
|
}
|