chore: Fix base URL redirection issue

This commit is contained in:
CyferShepard
2024-09-08 13:06:42 +02:00
parent 1aeede3dc9
commit 77eec15318

View File

@@ -102,7 +102,7 @@ const root = path.join(__dirname, "..", "dist");
//hacky middleware to handle basename changes for UI
app.use((req, res, next) => {
if (BASE_NAME && (req.url == "/" || req.url == "")) {
if (BASE_NAME && BASE_NAME != "" && (req.url == "/" || req.url == "")) {
return res.redirect(BASE_NAME);
}
// Ignore requests containing 'socket.io'