Parcourir la source

use origin instead of host

Kelly Norton il y a 11 mois
Parent
commit
9d56cd326e
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      ui/src/api.ts

+ 1 - 1
ui/src/api.ts

@@ -69,7 +69,7 @@ export async function getRoute(name: string): Promise<Route> {
 
 export async function getConfig(): Promise<Config> {
   const { host } = await fetch("/api/config").then((res) => res.json());
-  return host === "" ? { host: location.host } : { host };
+  return host === "" ? { host: location.origin } : { host };
 }
 
 export async function getRoutes(