]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Add gzip compression support for clickhouse module
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 12 Aug 2017 21:47:31 +0000 (22:47 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 12 Aug 2017 21:47:31 +0000 (22:47 +0100)
src/plugins/lua/clickhouse.lua

index 77b10a51bd0e4e5ba77fb57a247738e6c28894de..87738c8afe790c7f64d7cef8230bea71df382e2a 100644 (file)
@@ -55,6 +55,7 @@ local settings = {
   from_tables = nil,
   enable_symbols = false,
   use_https = false,
+  use_gzip = true,
 }
 
 local clickhouse_schema = {
@@ -262,6 +263,7 @@ local function clickhouse_send_data(task)
       url = connect_prefix .. settings['server'],
       body = body,
       callback = http_cb,
+      gzip = settings.use_gzip,
       mime_type = 'text/plain',
       timeout = settings['timeout'],
     }) then