-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.js
More file actions
19 lines (17 loc) · 786 Bytes
/
Copy patherrors.js
File metadata and controls
19 lines (17 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// -----------------------------------------------------------------------------
// Name: /errors.js
// Author: Adam Barreiro Costa
// Description: File to handle error pages.
// -----------------------------------------------------------------------------
function handle403(err, req, res, next) {
if (err.status !== 403) {
return next();
} else {
var html = ["<h1>Oooops :(</h1>",
"<p>Parece ser que has hecho algo que no debías o el servidor no se ha fiado de tu petición al revisarla y la ha rechazado.</p>",
"<p>No pasa nada, vuelve a intentarlo. <u>Vuelve atrás y recarga la página</u>, que esto no se ha roto.</p>",
].join("\n");
res.send(html);
}
}
exports.handle403 = handle403;