This commit is contained in:
Mateusz Gruszczyński
2025-08-28 22:54:52 +02:00
parent fe932e7a9f
commit 01b8ff656e
6 changed files with 419 additions and 256 deletions

41
.env.example Normal file
View File

@@ -0,0 +1,41 @@
# Podstawy
FLASK_DEBUG=false
SECRET_KEY=change-me
# Limity
MAX_CONTENT_LENGTH=52428800
RATE_LIMIT_DEFAULT="100 per minute"
RATE_LIMIT_CONVERT="100 per minute"
# Redis wybierz REDIS_URL lub HOST/PORT/DB
REDIS_URL=redis://localhost:6379/7
# REDIS_HOST=localhost
# REDIS_PORT=6379
# REDIS_DB=7
# Basic Auth dla /stats
STATS_BASIC_AUTH_ENABLED=true
STATS_BASIC_AUTH_REALM=Stats
STATS_BASIC_AUTH_USER=admin
STATS_BASIC_AUTH_PASS=strong-password
# Cache (Varnish-friendly)
CACHE_ENABLED=true
CACHE_S_MAXAGE=43200
CACHE_MAX_AGE=3600
USE_REDIS_BODY_CACHE=false
# Stream / aiohttp
AIOHTTP_TOTAL_TIMEOUT=70
AIOHTTP_CONNECT_TIMEOUT=10
AIOHTTP_SOCK_CONNECT_TIMEOUT=10
AIOHTTP_SOCK_READ_TIMEOUT=60
READ_CHUNK=65536
STREAM_LINE_LIMIT=4096
# Serwer
BIND_HOST=127.0.0.1
BIND_PORT=8283
# Domyślny URL źródłowy (opcjonalnie)
DEFAULT_SOURCE_URL="https://raw.githubusercontent.com/217heidai/adblockfilters/main/rules/adblockdns.txt"