local asn_rows = {}
local symbols_rows = {}
local nrows = 0
+local connect_prefix = 'http://'
local settings = {
limit = 1000,
full_urls = false,
from_tables = nil,
enable_symbols = false,
+ use_https = false,
}
--[[
local body = table.concat(rows, ' ')
if not rspamd_http.request({
task = task,
- url = 'http://' .. settings['server'],
+ url = connect_prefix .. settings['server'],
body = body,
callback = http_cb,
mime_type = 'text/plain',
body = table.concat(attachment_rows, ' ')
if not rspamd_http.request({
task = task,
- url = 'http://' .. settings['server'],
+ url = connect_prefix .. settings['server'],
body = body,
callback = http_cb,
mime_type = 'text/plain',
body = table.concat(urls_rows, ' ')
if not rspamd_http.request({
task = task,
- url = 'http://' .. settings['server'],
+ url = connect_prefix .. settings['server'],
body = body,
callback = http_cb,
mime_type = 'text/plain',
body = table.concat(asn_rows, ' ')
if not rspamd_http.request({
task = task,
- url = 'http://' .. settings['server'],
+ url = connect_prefix .. settings['server'],
body = body,
callback = http_cb,
mime_type = 'text/plain',
body = table.concat(symbols_rows, ' ')
if not rspamd_http.request({
task = task,
- url = 'http://' .. settings['server'],
+ url = connect_prefix .. settings['server'],
body = body,
callback = http_cb,
mime_type = 'text/plain',
body = table.concat(specific, ' ')
if not rspamd_http.request({
task = task,
- url = 'http://' .. settings['server'],
+ url = connect_prefix .. settings['server'],
body = body,
callback = http_cb,
mime_type = 'text/plain',
else
settings['from_map'] = rspamd_map_add('clickhouse', 'from_tables',
'regexp', 'clickhouse specific domains')
+ if settings.use_https then
+ connect_prefix = 'https://'
+ end
+
clickhouse_first_row()
rspamd_config:register_symbol({
name = 'CLICKHOUSE_COLLECT',