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