Use relative URLs throughout the UI

To allow serving from a subdirectory using a reverse proxy.
This commit is contained in:
Zaid Abdulla committed 2020-07-22 11:07:32 -07:00
1 parent c2c24f5c24
commit 5a9e03db2c
12 files changed
+30 -30

No files matched your search

+3 -3
View File
@@ -21,7 +21,7 @@ import m, { ClosureComponent, Component } from "mithril";
import * as notifications from "./notifications";
export async function init(): Promise<{}> {
return m.request({ url: "/init" });
return m.request({ url: "init" });
}
export const component: ClosureComponent = (vnode): Component => {
@@ -82,12 +82,12 @@ export const component: ClosureComponent = (vnode): Component => {
m.request({
method: "POST",
url: "/init",
url: "init",
body: opts
})
.then(() => {
setTimeout(() => {
m.request({ url: "/init" }).then(o => {
m.request({ url: "init" }).then(o => {
e.target.disabled = false;
options = o;
notifications.push("success", "Initialization complete", {