Skip to content

Commit 1cfc1bd

Browse files
committed
fix basePath in home.ejs
1 parent e01d426 commit 1cfc1bd

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/wol.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ router.get("/", async (req, res, next) => {
460460
email: req.user.email,
461461
},
462462
serviceUrl: serviceUrl,
463+
basePath: ENV.basePath,
463464
})
464465
})
465466

views/home.ejs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66

7+
<base href="<%= basePath %>/" />
8+
79
<link rel="stylesheet" href="style/theme.css" />
810
<link rel="stylesheet" href="style/default.css" />
911
<link rel="stylesheet" href="style/user.css" />
@@ -76,9 +78,9 @@
7678
</div>
7779

7880
<script type="module">
79-
import { startWoLProcess } from "/js/wol.js"
80-
import { setUser } from "/js/user.js"
81-
import { initToggle } from "/js/theme.js"
81+
import { startWoLProcess } from "js/wol.js"
82+
import { setUser } from "js/user.js"
83+
import { initToggle } from "js/theme.js"
8284
8385
const userData = {
8486
name: "<%= user.name %>",
@@ -155,7 +157,7 @@
155157
}, 250)
156158
}
157159
},
158-
endpoint: `${window.location.origin}/start`,
160+
endpoint: `${document.baseURI}/start`,
159161
})
160162
}
161163

0 commit comments

Comments
 (0)