aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/router.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-03-26 15:18:34 +0100
committerDennis Eriksen <dennis.se@gmail.com>2013-03-26 15:18:34 +0100
commit04a860aa383006cf5ab282cd02529c4e0cd67a20 (patch)
tree117528144742eef4ced851bbd145e53eddffa18b /router.js
parentadded the html (diff)
downloadDivid-04a860aa383006cf5ab282cd02529c4e0cd67a20.tar.gz
added 403 when posting to wrong page
Diffstat (limited to '')
-rw-r--r--router.js27
1 files changed, 7 insertions, 20 deletions
diff --git a/router.js b/router.js
index 50b5419..3d9558c 100644
--- a/router.js
+++ b/router.js
@@ -52,32 +52,19 @@ module.exports = function(app) {
-
-
-
-
-
-
-
/*
- * 404 ERROR
+ * ERRORS
*/
+ /* 404 */
app.get('*', function(req, res) {
res.render('error', { title: '404', text: 'Fant ikke siden' });
});
+ /* 403 on POST */
+ app.post('*', function(req, res) {
+ res.render('error', { title: '403', text: 'Du har ikke tilgang til denne siden' });
+ });
-
-
-
-
-
-
-
-
-
-
-
-}
+};