How can I send a 403 error message and display a page with the message "you are not allowed to visit this page"?
I have the following:
res.send(403,"You do not have rights to visit this page");
but I want to make an HTML page instead of body text
res.render('no-rights', {title: 'You have no rights to visit this page', text: 'You are not allowed to visited this page. Maybe you are not logged in?'});
with a status of 403.
source
share