Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

455 B
Raw Blame
interface HomarrRuntimeConfig {
  homarrWebsiteUrl?: string;
  workshopApiUrl?: string;
  workshopWebUrl?: string;
}

declare global {
  interface Window {
    homarrRuntimeConfig?: Readonly<HomarrRuntimeConfig>;
  }
}

export const getRuntimeWorkshopApiUrl = (configuredUrl: string): string => {
  if (typeof window === "undefined") return configuredUrl;
  return window.homarrRuntimeConfig?.workshopApiUrl || configuredUrl || window.location.origin;
};