INNER CODE UNIT · TypeScript

getPortalURL

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

export const getPortalURL = (): string => {
  if (isDev()) {
    return import.meta.env.VITE_PORTAL_URL || window.location.origin;
  }

  const domain = getDomain();
  return domain ? `https://portal.${domain}` : "/";
};

export const getSafeRedirectURL = (value: string): string => {
  const url = new URL(value, window.location.origin);
  if (url.protocol !== "http:" && url.protocol !== "https:") {
    throw new Error("Unsupported redirect URL protocol");
  }
  return value;
};

export const queryClient = new QueryClient({

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…