mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-16 05:00:02 -04:00
Properly routed the error page.
This commit is contained in:
parent
4fed66a39d
commit
9b1a9aee47
1 changed files with 2 additions and 1 deletions
|
@ -105,7 +105,7 @@ router.get("/", async (req, res) =>
|
||||||
'views',
|
'views',
|
||||||
// Return the error page if the query is not found, as there is no
|
// Return the error page if the query is not found, as there is no
|
||||||
// undefined page in routes.mjs. Also set index as the default page.
|
// undefined page in routes.mjs. Also set index as the default page.
|
||||||
'/?'.indexOf(req.url) ? pages[Object.keys(req.query)[0]] || text404 : pages.index
|
'/?'.indexOf(req.url) ? pages[Object.keys(req.query)[0]] || 'error.html' : pages.index
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -122,6 +122,7 @@ app.use("/baremux/", express.static(baremuxPath));
|
||||||
|
|
||||||
app.disable("x-powered-by");
|
app.disable("x-powered-by");
|
||||||
|
|
||||||
|
// Redundant code since 404 is handled elsewhere; left here as insurance.
|
||||||
app.use((req, res) => {
|
app.use((req, res) => {
|
||||||
res.status(404).send(paintSource(loadTemplates(text404)));
|
res.status(404).send(paintSource(loadTemplates(text404)));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue