Whitelist which config settings to send for API endpoint

Avoids sharing private username and password for Steam etc
This commit is contained in:
Björn Dahlgren 2017-08-06 11:30:04 +02:00 committed by Björn Dahlgren
parent 6278bf02f5
commit b37342e100

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