Explorar o código

fix: unauthorized admin should receive 403 code

NGPixel %!s(int64=5) %!d(string=hai) anos
pai
achega
4cd6fe8a56
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/controllers/common.js

+ 1 - 1
server/controllers/common.js

@@ -47,7 +47,7 @@ router.get(['/a', '/a/*'], (req, res, next) => {
     'manage:api'
   ])) {
     _.set(res.locals, 'pageMeta.title', 'Unauthorized')
-    return res.render('unauthorized', { action: 'view' })
+    return res.status(403).render('unauthorized', { action: 'view' })
   }
 
   _.set(res.locals, 'pageMeta.title', 'Admin')