Remove default user agent

closes #4787
This commit is contained in:
Stephen McLaughlin 2024-06-24 11:21:51 +01:00 committed by GitHub
parent cb0c484579
commit e7ef73222f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -534,9 +534,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
opts.headers[clSet] = opts.headers['content-length'];
delete opts.headers['content-length'];
}
if (!opts.headers.hasOwnProperty('user-agent')) {
opts.headers['user-agent'] = 'Mozilla/5.0 (Node-RED)';
}
if (proxyUrl) {
const match = proxyUrl.match(/^(https?:\/\/)?(.+)?:([0-9]+)?/i);
if (match) {