perf: 远程配下载与合并
parent
498c7cbec2
commit
296c5c15f0
|
@ -122,12 +122,17 @@ const configApi = {
|
||||||
if (get().app.remoteConfig.enabled !== true) {
|
if (get().app.remoteConfig.enabled !== true) {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
const path = _getRemoteSavePath()
|
try {
|
||||||
if (fs.existsSync()) {
|
const path = _getRemoteSavePath()
|
||||||
const file = fs.readFileSync(path)
|
|
||||||
log.info('读取合并远程配置文件:', path)
|
log.info('读取合并远程配置文件:', path)
|
||||||
return JSON5.parse(file.toString())
|
if (fs.existsSync(path)) {
|
||||||
|
const file = fs.readFileSync(path)
|
||||||
|
return JSON5.parse(file.toString())
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log.info('远程配置读取有误', e)
|
||||||
}
|
}
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -76,8 +76,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
'github.githubassets.com': {
|
'github.githubassets.com': {
|
||||||
'.*': {
|
'.*': {
|
||||||
proxy: 'assets.fastgit.org',
|
proxy: 'assets.fastgit.org'
|
||||||
sni11: 'baidu.com'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'customer-stories-feed.github.com': {
|
'customer-stories-feed.github.com': {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
'github.githubassets.com': {
|
'github.githubassets.com': {
|
||||||
'.*': {
|
'.*': {
|
||||||
proxy: 'assets.fastgit.org',
|
proxy: 'assets.fastgit.org',
|
||||||
sni11: 'baidu.com'
|
sni: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue