mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-14 00:16:21 +00:00
Hehe..
This commit is contained in:
parent
878bdd484d
commit
6246436aed
@ -62,10 +62,11 @@ for (let page of config.pages) {
|
|||||||
|
|
||||||
// NOTE: Uses fiery-me branch of https://github.com/BobbyWibowo/HttpErrorPages
|
// NOTE: Uses fiery-me branch of https://github.com/BobbyWibowo/HttpErrorPages
|
||||||
safe.use((req, res, next) => {
|
safe.use((req, res, next) => {
|
||||||
const errorCodes = [400, 401, 403, 404, 500, 501, 502, 503, 520, 521, 533]
|
res.status(404).sendFile('HTTP404.html', { root: '../HttpErrorPages/dist/' })
|
||||||
for (const e of errorCodes) {
|
})
|
||||||
res.status(e).sendFile(`HTTP${e}.html`, { root: '../HttpErrorPages/dist/' })
|
safe.use((err, req, res, next) => {
|
||||||
}
|
console.error(err)
|
||||||
|
res.status(500).sendFile('HTTP505.html', { root: '../HttpErrorPages/dist/' })
|
||||||
})
|
})
|
||||||
|
|
||||||
safe.listen(config.port, () => console.log(`lolisafe started on port ${config.port}`))
|
safe.listen(config.port, () => console.log(`lolisafe started on port ${config.port}`))
|
||||||
|
Loading…
Reference in New Issue
Block a user