]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Allow to extract raw header
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Aug 2018 19:18:03 +0000 (20:18 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Aug 2018 19:18:03 +0000 (20:18 +0100)
lualib/lua_selectors.lua

index 8a157145497cbda3d2f3e20572fc79f3aac0fe21..4a58459741e0450e72cdadf821c0f08d94505675 100644 (file)
@@ -317,6 +317,16 @@ local transform_function = {
       return inp.value
     end
   },
+  -- Get header raw value
+  ['hdr_raw'] = {
+    ['types'] = {
+      ['header'] = true,
+    },
+    ['map_type'] = 'string',
+    ['process'] = function(inp, _)
+      return inp.raw
+    end
+  },
   -- Extracts table value from table
   ['elt'] = {
     ['types'] = {