diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-12 15:59:41 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 20:37:57 +0100 |
commit | 76f65c13d77759321f128035bd1ce4aa9b2cec46 (patch) | |
tree | 8926833808d174efee318b84c20873e6d8c8a072 | |
parent | 1c6154728411e206d651ad05fce093a80168f64f (diff) |
global-functions: add architecture in user-agent string
-rw-r--r-- | global-functions.rsc | 7 |
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 |