From 13d50e71f68057b1e71169a4d326200738ab570f Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sat, 24 Jun 2023 10:04:11 +0200 Subject: [PATCH] Enable link_token method for bot blocking in SearXNG --- roles/docker_services/tasks/services/searxng.yml | 7 +++++++ roles/docker_services/templates/limiter.toml.j2 | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 roles/docker_services/templates/limiter.toml.j2 diff --git a/roles/docker_services/tasks/services/searxng.yml b/roles/docker_services/tasks/services/searxng.yml index b9a0a25..955e3ea 100644 --- a/roles/docker_services/tasks/services/searxng.yml +++ b/roles/docker_services/tasks/services/searxng.yml @@ -14,6 +14,13 @@ owner: root mode: u=rw,g=r,o=r +- name: Copy SearXNG limiter.toml file + ansible.builtin.template: + src: limiter.toml.j2 + dest: "{{ services.searxng.volume }}/limiter.toml" + owner: root + mode: u=rw,g=r,o=r + - name: Deploy SearXNG with Docker Compose community.docker.docker_compose: project_name: searxng diff --git a/roles/docker_services/templates/limiter.toml.j2 b/roles/docker_services/templates/limiter.toml.j2 new file mode 100644 index 0000000..b113049 --- /dev/null +++ b/roles/docker_services/templates/limiter.toml.j2 @@ -0,0 +1,3 @@ +# vim: ft=toml +[botdetection.ip_limit] +link_token = true