diff options
| author | kanadeko <[email protected]> | 2017-01-14 06:06:01 -0300 |
|---|---|---|
| committer | kanadeko <[email protected]> | 2017-01-14 06:06:01 -0300 |
| commit | 3b648ab45ea3dbcf41f39f5cc9c6244ea381f6ae (patch) | |
| tree | c235a87604908953a5bcd78fd19620c912030edf /controllers/galleryController.js | |
| parent | IP whitelisting (diff) | |
| download | host.fuwn.me-3b648ab45ea3dbcf41f39f5cc9c6244ea381f6ae.tar.xz host.fuwn.me-3b648ab45ea3dbcf41f39f5cc9c6244ea381f6ae.zip | |
Frontend ip blocking
Diffstat (limited to 'controllers/galleryController.js')
| -rw-r--r-- | controllers/galleryController.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/controllers/galleryController.js b/controllers/galleryController.js index c7ea726..a74dde5 100644 --- a/controllers/galleryController.js +++ b/controllers/galleryController.js @@ -6,7 +6,7 @@ let galleryController = {} galleryController.list = function(req, res, next){ if(!config.privacy.public) - if(!config.privacy.IPs.includes(req.ip)) return res.status(401).send('Not Authorized!') + if(!config.privacy.IPs.includes(req.ip)) return res.status(401).send('not-authorized') db.table('gallery').select('id', 'name').then((data) => { res.json({ data }) @@ -16,7 +16,7 @@ galleryController.list = function(req, res, next){ galleryController.test = function(req, res, next){ if(!config.privacy.public) - if(!config.privacy.IPs.includes(req.ip)) return res.status(401).send('Not Authorized!') + if(!config.privacy.IPs.includes(req.ip)) return res.status(401).send('not-authorized') let testdata = [ {name: 'Test 1'}, |