mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-20 04:24:46 -04:00
Set default ua for axios: Uptime-Kuma/version
instead of axios/version
This commit is contained in:
parent
e11aad2d60
commit
bbaba29222
3 changed files with 8 additions and 4 deletions
|
@ -447,7 +447,6 @@ class Monitor extends BeanModel {
|
|||
timeout: this.timeout * 1000,
|
||||
headers: {
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
|
||||
"User-Agent": "Uptime-Kuma/" + version,
|
||||
...(contentType ? { "Content-Type": contentType } : {}),
|
||||
...(basicAuthHeader),
|
||||
...(oauth2AuthHeader),
|
||||
|
@ -627,7 +626,6 @@ class Monitor extends BeanModel {
|
|||
timeout: this.timeout * 1000,
|
||||
headers: {
|
||||
"Accept": "*/*",
|
||||
"User-Agent": "Uptime-Kuma/" + version,
|
||||
},
|
||||
httpsAgent: CacheableDnsHttpAgent.getHttpsAgent({
|
||||
maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940)
|
||||
|
@ -681,7 +679,6 @@ class Monitor extends BeanModel {
|
|||
timeout: this.interval * 1000 * 0.8,
|
||||
headers: {
|
||||
"Accept": "*/*",
|
||||
"User-Agent": "Uptime-Kuma/" + version,
|
||||
},
|
||||
httpsAgent: CacheableDnsHttpAgent.getHttpsAgent({
|
||||
maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue