diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-18 09:31:40 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-18 09:31:40 +0100 |
commit | 079249f3d7a1c4c11aa2b4d93b3cf239b0f5da0d (patch) | |
tree | 7d886bbb91680f76a8dd4f484bd3c3b33f64fe42 /check-routeros-update.rsc | |
parent | cd371b69a642d9e3a0bc32795e959c7feef42522 (diff) |
check-routeros-update: use custom user agent string
Diffstat (limited to 'check-routeros-update.rsc')
-rw-r--r-- | check-routeros-update.rsc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/check-routeros-update.rsc b/check-routeros-update.rsc index e209610..fde7cb5 100644 --- a/check-routeros-update.rsc +++ b/check-routeros-update.rsc @@ -24,6 +24,7 @@ :global DeviceInfo; :global EscapeForRegEx; + :global FetchUserAgent; :global LogPrint; :global ScriptFromTerminal; :global ScriptLock; @@ -108,7 +109,8 @@ :do { :set Result [ /tool/fetch check-certificate=yes-without-crl \ ($SafeUpdateUrl . $Update->"channel" . "?installed=" . $Update->"installed-version" . \ - "&latest=" . $Update->"latest-version") output=user as-value ]; + "&latest=" . $Update->"latest-version") http-header-field=({ [ $FetchUserAgent $ScriptName ] }) \ + output=user as-value ]; } on-error={ $LogPrint warning $ScriptName ("Failed receiving safe version for " . $Update->"channel" . "."); } |