global-functions: add architecture in user-agent string

This commit is contained in:
Christian Hesse 2024-03-12 15:59:41 +01:00
parent 1c61547284
commit 76f65c13d7

View file

@ -16,7 +16,12 @@
# global variables not to be changed by user
:global GlobalFunctionsReady false;
:global FetchUserAgent ("User-Agent: Mikrotik/" . [ /system/resource/get version ] . " Fetch");
:global FetchUserAgent;
{
:local Resource [ /system/resource/get ];
:set FetchUserAgent ("User-Agent: Mikrotik/" . $Resource->"version" . \
" " . $Resource->"architecture-name" . " Fetch");
}
:global Identity [ /system/identity/get name ];
# global functions