1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

check-routeros-update: use custom user agent string

This commit is contained in:
Christian Hesse
2024-03-18 09:31:40 +01:00
parent cd371b69a6
commit 079249f3d7

View File

@ -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" . ".");
}