INNER CODE UNIT · TypeScript

getDomain

octelium/octelium · cluster/authserver/authserver/web/package/src/utils/index.ts:16

export const getDomain = (): string => {
  if (isDev()) {
    return window.location.host;
  }

  if (__domain) {
    return __domain;
  }

  const cookieDomain =
    ("; " + window.document.cookie)
      .split("; octelium_domain=")
      .pop()
      ?.split(";")
      .shift() ?? "";

  try {
    __domain = decodeURIComponent(cookieDomain);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…