X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=server%2Futils%2Faccess.js;h=11753a0a718b0e4ee9bdf4e1529b4054f3dfd33b;hb=dcd68c4108412f45b8ce119ae80ce8f6e296800b;hp=a7eb92ac6ea5c71309cb857356ffd721f7619cb4;hpb=98f485791e915563996de4f37430b285ffc773ae;p=vchess.git diff --git a/server/utils/access.js b/server/utils/access.js index a7eb92ac..11753a0a 100644 --- a/server/utils/access.js +++ b/server/utils/access.js @@ -48,7 +48,7 @@ module.exports = // Prevent direct access to AJAX results ajax: function(req, res, next) { - if (!req.xhr) + if (!req.xhr) return res.json({errmsg: "Unauthorized access"}); next(); },