Skip to content

Commit 9ad67b9

Browse files
committed
_ajax 暴露一个属性用于自定义 User Agent(Node.js 环境)
1 parent bc017e6 commit 9ad67b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browserify-wrapper/ajax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = function _ajax(method, resourceUrl, data, success, error) {
4444
agent: transportAgent,
4545
headers: {
4646
'Content-Type': 'text/plain',
47-
'User-Agent': 'AV/' + VERSION + ' (Node.js' + process.version + ')'
47+
'User-Agent': _ajax.userAgent || 'AV/' + VERSION + '; Node.js/' + process.version
4848
}
4949
});
5050

0 commit comments

Comments
 (0)