add URL base option for subfolder proxies

also cleaned up the naming of some things.
This commit is contained in:
Harvey Tindall
2020-11-22 16:36:43 +00:00
parent e35d0579c8
commit 9dbf60e3df
15 changed files with 145 additions and 115 deletions
+4 -2
View File
@@ -121,10 +121,12 @@ window.toClipboard = (str: string): void => {
function login(username: string, password: string, modal: boolean, button?: HTMLButtonElement, run?: (arg0: number) => void): void {
const req = new XMLHttpRequest();
req.responseType = 'json';
let url = "/token/login";
let url = window.URLBase;
const refresh = (username == "" && password == "");
if (refresh) {
url = "/token/refresh";
url += "/token/refresh";
} else {
url += "/token/login";
}
req.open("GET", url, true);
if (!refresh) {