util: Do not expose the entire application config, only relevant parts
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
This commit is contained in:
parent
e853474cdd
commit
7f6d1546f2
3 changed files with 9 additions and 2 deletions
|
@ -22,7 +22,12 @@ export function getConfig(ctx) {
|
||||||
applications: []
|
applications: []
|
||||||
}
|
}
|
||||||
for (let app of ctx.core.applications) {
|
for (let app of ctx.core.applications) {
|
||||||
merge[app.name] = app.config
|
merge[app.name] = {
|
||||||
|
provider: app.config.provider || null,
|
||||||
|
url: app.config.url || null,
|
||||||
|
port: app.config.port || null,
|
||||||
|
scAllowStop: app.config.scAllowStop || null,
|
||||||
|
}
|
||||||
merge.applications.push(app.name)
|
merge.applications.push(app.name)
|
||||||
}
|
}
|
||||||
return defaults(ctx.db.config, merge)
|
return defaults(ctx.db.config, merge)
|
||||||
|
|
|
@ -10,6 +10,8 @@ const core = {
|
||||||
status: {},
|
status: {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.core = core
|
||||||
|
|
||||||
socket.on('core.config', function(res) {
|
socket.on('core.config', function(res) {
|
||||||
core.apps = []
|
core.apps = []
|
||||||
let keys = Object.keys(res)
|
let keys = Object.keys(res)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sc-manager",
|
"name": "sc-manager",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in a new issue