Home / Function/ getClientSideURL() — supabase Function Reference

getClientSideURL() — supabase Function Reference

Architecture documentation for the getClientSideURL() function in getURL.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  220cf376_6913_f930_10cc_441b6ddcb173["getClientSideURL()"]
  1dc9d047_bfff_8ce6_da05_e00e4998fd57["AdminBar()"]
  1dc9d047_bfff_8ce6_da05_e00e4998fd57 -->|calls| 220cf376_6913_f930_10cc_441b6ddcb173
  52070390_9278_90fb_0f7f_ce0a238f1d86["LivePreviewListener()"]
  52070390_9278_90fb_0f7f_ce0a238f1d86 -->|calls| 220cf376_6913_f930_10cc_441b6ddcb173
  cb9e7012_468e_2943_14d5_5e2b0d47e414["ImageMedia()"]
  cb9e7012_468e_2943_14d5_5e2b0d47e414 -->|calls| 220cf376_6913_f930_10cc_441b6ddcb173
  d1f634e7_7c68_0073_9240_140cf0511ac0["VideoMedia()"]
  d1f634e7_7c68_0073_9240_140cf0511ac0 -->|calls| 220cf376_6913_f930_10cc_441b6ddcb173
  3e2b9d89_c8b1_52a9_f252_f2fdede55e26["getMeUser()"]
  3e2b9d89_c8b1_52a9_f252_f2fdede55e26 -->|calls| 220cf376_6913_f930_10cc_441b6ddcb173
  style 220cf376_6913_f930_10cc_441b6ddcb173 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/cms/src/utilities/getURL.ts lines 17–31

export const getClientSideURL = () => {
  if (canUseDOM) {
    const protocol = window.location.protocol
    const domain = window.location.hostname
    const port = window.location.port

    return `${protocol}//${domain}${port ? `:${port}` : ''}`
  }

  if (process.env.VERCEL_PROJECT_PRODUCTION_URL) {
    return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
  }

  return process.env.NEXT_PUBLIC_SERVER_URL || ''
}

Subdomains

Frequently Asked Questions

What does getClientSideURL() do?
getClientSideURL() is a function in the supabase codebase.
What calls getClientSideURL()?
getClientSideURL() is called by 5 function(s): AdminBar, ImageMedia, LivePreviewListener, VideoMedia, getMeUser.

Analyze Your Own Codebase

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

Try Supermodel Free