mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-17 20:28:31 +02:00
- Create entrypoint.sh script that creates limiter.toml before SearXNG starts - Script removes any existing limiter.toml (file or directory) first - Then creates proper limiter.toml with bot detection bypass - Finally executes the original SearXNG entrypoint - This approach is more reliable than inline commands
28 lines
601 B
Bash
Executable File
28 lines
601 B
Bash
Executable File
#!/bin/sh
|
|
# Custom entrypoint for SearXNG - creates limiter.toml before starting
|
|
|
|
# Remove any existing limiter.toml (file or directory)
|
|
rm -rf /etc/searxng/limiter.toml
|
|
|
|
# Create limiter.toml to disable bot detection
|
|
cat > /etc/searxng/limiter.toml << 'EOF'
|
|
[botdetection.ip_limit]
|
|
link_token = false
|
|
|
|
[botdetection.ip_lists]
|
|
pass_ip = [
|
|
"0.0.0.0/0",
|
|
"127.0.0.0/8",
|
|
"10.0.0.0/8",
|
|
"172.16.0.0/12",
|
|
"192.168.0.0/16",
|
|
"::/0"
|
|
]
|
|
block_ip = []
|
|
EOF
|
|
|
|
echo "limiter.toml created successfully"
|
|
|
|
# Execute the original entrypoint
|
|
exec /usr/local/searxng/dockerfiles/docker-entrypoint.sh
|