Skip to content

Commit

Permalink
小调整
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Oct 16, 2024
1 parent 2218e80 commit 8857449
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/mitmproxy/src/lib/proxy/compatible/compatible.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ function _loadFromFile (defaultConfig) {
const file = fs.readFileSync(configPath)
log.info('读取 automaticCompatibleConfig.json 成功:', configPath)
const fileStr = file.toString()
config = fileStr && fileStr.length > 2 ? jsonApi.parse(fileStr) : {}
config = fileStr && fileStr.length > 2 ? jsonApi.parse(fileStr) : defaultConfig
if (config.connect == null) config.connect = defaultConfig.connect
if (config.request == null) config.request = defaultConfig.request
}

return config
Expand Down

0 comments on commit 8857449

Please sign in to comment.