searxng / searxng-docker

The docker-compose files for setting up a SearXNG instance with docker.
GNU Affero General Public License v3.0
1.21k stars 290 forks source link

Enable limiter by default #182

Closed dalf closed 1 year ago

dalf commented 1 year ago

See https://github.com/searxng/searxng/pull/2832

unixfox commented 1 year ago

For limiter.toml, can't we just have this content:

[botdetection.ip_limit]

link_token = true

?

This way we do not touch the default settings.

dalf commented 1 year ago

nope : this works only for settings.yml

unixfox commented 1 year ago

Hum that's a huge bummer, wasn't that one of the benefit of using toml that you said @return42?

We would like to override values like ipv4_prefix or ipv6_prefix in the future.

return42 commented 1 year ago

nope : this works only for settings.yml

Thats not true, I implemented https://github.com/searxng/searxng/blob/master/searx/tools/config.py with this config class the defaults are read from the schema file and updated by the /etc/searxng/limiter.toml file .. see https://github.com/searxng/searxng/blob/71358e9c673247e16125dc32b70f2553c469d814/searx/botdetection/limiter.py#L70-L85

unixfox commented 1 year ago

My memory is not failing, thank you @return42.

@dalf could you update the limiter.toml? thank you

dalf commented 1 year ago

Done, at least I hope so. The searx.tools and searx.botlimiter aka limiter are unknown to me.

unixfox commented 1 year ago

The only issue here is that this will require people to git pull then docker compose up for this new change to be effective.

unixfox commented 1 year ago

Just tested on:

works really great