aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-12 15:59:41 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-12 20:37:57 +0100
commit76f65c13d77759321f128035bd1ce4aa9b2cec46 (patch)
tree8926833808d174efee318b84c20873e6d8c8a072
parent1c6154728411e206d651ad05fce093a80168f64f (diff)
global-functions: add architecture in user-agent string
-rw-r--r--global-functions.rsc7
1 files changed, 6 insertions, 1 deletions
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