From 76f65c13d77759321f128035bd1ce4aa9b2cec46 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 12 Mar 2024 15:59:41 +0100 Subject: global-functions: add architecture in user-agent string --- global-functions.rsc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index d2386f4..1c2523a 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -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 -- cgit v1.2.3-70-g09d2