Home / Function/ isAllowedCorsOrigin() — supabase Function Reference

isAllowedCorsOrigin() — supabase Function Reference

Architecture documentation for the isAllowedCorsOrigin() function in route.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  84859638_9683_aecb_7417_473b553f8468["isAllowedCorsOrigin()"]
  32c83917_970b_cf02_2abb_8389e879c684["getCorsHeaders()"]
  32c83917_970b_cf02_2abb_8389e879c684 -->|calls| 84859638_9683_aecb_7417_473b553f8468
  style 84859638_9683_aecb_7417_473b553f8468 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/app/api/graphql/route.ts lines 49–58

function isAllowedCorsOrigin(origin: string): boolean {
  const exactMatches = IS_DEV
    ? ['http://localhost:8082', 'https://supabase.com']
    : ['https://supabase.com']
  if (exactMatches.includes(origin)) {
    return true
  }

  return /^https:\/\/[\w-]+\w-supabase.vercel.app$/.test(origin)
}

Subdomains

Called By

Frequently Asked Questions

What does isAllowedCorsOrigin() do?
isAllowedCorsOrigin() is a function in the supabase codebase.
What calls isAllowedCorsOrigin()?
isAllowedCorsOrigin() is called by 1 function(s): getCorsHeaders.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free