# Please don't modify this file as your changes might be overwritten with
# the next update.
#
# You can modify 'local.d/url_redirector.conf' to add and merge
# parameters defined inside this section
#
# You can modify 'override.d/url_redirector.conf' to strictly override all
# parameters defined inside this section
#
# See https://rspamd.com/doc/faq.html#what-are-the-locald-and-overrided-directories
# for details
#
# Module documentation can be found at  https://rspamd.com/doc/modules/url_redirector.html

url_redirector {
  expire = 1d; # 1 day by default
  timeout = 8s; # total timeout of module
  http_timeout = 4s; # HTTP HEAD timeout per redirect hop Either a number (whole-request duration)
  # or a table with .connect_timeout, .ssl_timeout, .write_timeout, .read_timeout for granular control.
  # http_timeout = {
  #   connect_timeout = 2s;
  #   ssl_timeout = 2s;
  #   write_timeout = 1s;
  #   read_timeout = 3s;
  # };
  redis_timeout = 2s; # redis timeout for cache operations (redis.conf module has higher priority)
  nested_limit = 2; # how many redirects to follow
  key_prefix = "rdr:"; # default hash name
  check_ssl = false; # check ssl certificates
  max_urls = 5; # how many urls to check (CTA checked in first place)
  max_size = 10k; # maximum body to process
  redirectors_only = true; # follow only known redirectors
  top_urls_key = "rdr:top_urls"; # key for top urls
  top_urls_count = 200; # how many top urls to save
  save_intermediate_redirs = {
    redirectors = false;
    non_redirectors = true; # inject non-redirector hops by default since they can hide cloaker phishing urls
  }

  .include(try=true,priority=5) "${DBDIR}/dynamic/url_redirector.conf"
  .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/url_redirector.conf"
  .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/url_redirector.conf"
}
