mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
fix: support nimbus project urls for testing edge functions (#39548)
This commit is contained in:
1 parent
7ff8724481
commit
ec6c90bce2
2 files changed
+10
-1
No files matched your search
@@ -1,4 +1,12 @@
|
||||
const NIMBUS_PROD_PROJECTS_URL = process.env.NIMBUS_PROD_PROJECTS_URL
|
||||
|
||||
export const isValidEdgeFunctionURL = (url: string) => {
|
||||
if (NIMBUS_PROD_PROJECTS_URL !== undefined) {
|
||||
const apexDomain = NIMBUS_PROD_PROJECTS_URL.replace('https://*.', '').replace(/\./g, '\\.')
|
||||
const nimbusRegex = new RegExp('^https://[a-z]*\\.' + apexDomain + '/functions/v[0-9]{1}/.*$')
|
||||
return nimbusRegex.test(url)
|
||||
}
|
||||
|
||||
const regexValidEdgeFunctionURL = new RegExp(
|
||||
'^https://[a-z]*.supabase.(red|co)/functions/v[0-9]{1}/.*$'
|
||||
)
|
||||
|
||||
+2
-1
@@ -112,7 +112,8 @@
|
||||
"VERCEL_URL",
|
||||
"IS_THROTTLED",
|
||||
"AI_PRO_MODEL",
|
||||
"AI_NORMAL_MODEL"
|
||||
"AI_NORMAL_MODEL",
|
||||
"NIMBUS_PROD_PROJECTS_URL"
|
||||
],
|
||||
"passThroughEnv": ["CURRENT_CLI_VERSION", "VERCEL_GIT_COMMIT_SHA"],
|
||||
"outputs": [".next/**", "!.next/cache/**"]
|
||||
|
||||
Reference in new issue
Block a user