Merge pull request #97 from Dahlgren/feature/api-whitelist-config

Whitelist which config settings to send for API endpoint
This commit is contained in:
Björn Dahlgren 2018-01-02 14:44:31 +01:00 committed by GitHub
commit bcb1fe6a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,11 @@
var express = require('express')
var _ = require('lodash')
module.exports = function (config) {
var router = express.Router()
router.get('/', function (req, res) {
res.json(config)
res.json(_.pick(config, ['game', 'path', 'type']))
})
return router