login fix

This commit is contained in:
MathMan05
2024-09-27 09:43:03 -05:00
parent 926defee75
commit 881b01e342

View File

@@ -286,12 +286,13 @@ async function getapiurls(str: string): Promise<
url.pathname.includes("api") ? "" : "api" url.pathname.includes("api") ? "" : "api"
}/policies/instance/domains` }/policies/instance/domains`
).then(x=>x.json()); ).then(x=>x.json());
const apiurl = new URL(info.apiEndpoint);
return{ return{
api: info.apiEndpoint+(url.pathname.includes("api") ? "" : "/api"), api: info.apiEndpoint+(apiurl.pathname.includes("api") ? "" : "/api"),
gateway: info.gateway, gateway: info.gateway,
cdn: info.cdn, cdn: info.cdn,
wellknown: str, wellknown: str,
login: info.apiEndpoint, login: info.apiEndpoint+(apiurl.pathname.includes("api") ? "" : "/api"),
}; };
}catch{ }catch{
const val = stringURLsMap.get(str); const val = stringURLsMap.get(str);