diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-03-26 15:18:34 +0100 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-03-26 15:18:34 +0100 |
commit | 04a860aa383006cf5ab282cd02529c4e0cd67a20 (patch) | |
tree | 117528144742eef4ced851bbd145e53eddffa18b /router.js | |
parent | added the html (diff) | |
download | Divid-04a860aa383006cf5ab282cd02529c4e0cd67a20.tar.gz |
added 403 when posting to wrong page
Diffstat (limited to '')
-rw-r--r-- | router.js | 27 |
1 files changed, 7 insertions, 20 deletions
@@ -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' }); + }); - - - - - - - - - - - -} +}; |