Major refactor: Fix SQLite concurrency, remove rate limiting, simplify architecture

- Switch to single Gunicorn worker to eliminate SQLite database locking issues
- Remove Flask-Limiter and all rate limiting complexity
- Remove Cloudflare proxy setup and dependencies
- Simplify configuration and remove unnecessary features
- Update all templates and static files for streamlined operation
- Clean up old files and documentation
- Restore stable database from backup
- System now runs fast and reliably without database locks
This commit is contained in:
2025-09-21 19:45:08 +01:00
parent b08b81fec9
commit cd27cc8ad9
26 changed files with 1326 additions and 677 deletions

View File

@@ -3,10 +3,10 @@
"name": "ircquotes",
"host": "127.0.0.1",
"port": 6969,
"debug": false
"debug": true
},
"gunicorn": {
"workers": 4,
"workers": 1,
"timeout": 30,
"keepalive": 5,
"max_requests": 1000,
@@ -24,12 +24,6 @@
"session_cookie_secure": false,
"session_cookie_httponly": true,
"session_cookie_samesite": "Lax",
"proxy_setup": {
"behind_cloudflare": true,
"behind_nginx": true,
"trusted_proxies": 2,
"cloudflare_ip_header": "CF-Connecting-IP"
},
"security_headers": {
"x_content_type_options": "nosniff",
"x_frame_options": "DENY",
@@ -38,25 +32,9 @@
"content_security_policy": "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self'"
}
},
"rate_limiting": {
"enabled": true,
"global_limit": "1000 per hour",
"endpoints": {
"login": "5 per minute",
"submit": "5 per minute",
"modapp": "20 per minute",
"bulk_actions": "10 per minute",
"approve": "30 per minute",
"reject": "30 per minute",
"delete": "20 per minute",
"vote": "60 per minute",
"flag": "10 per minute",
"search": "30 per minute"
}
},
"admin": {
"username": "admin",
"password_hash": "$argon2i$v=19$m=65536,t=4,p=1$cWZDc1pQaUJLTUJoaVI4cw$kn8XKz6AEZi8ebXfyyZuzommSypliVFrsGqzOyUEIHA"
"username": "ComputerTech",
"password_hash": "$argon2id$v=19$m=65536,t=3,p=4$cIPRCJrjS1DwjaFov5G+BQ$yundbpf2i1jBrKsj96ra7wTNmVZ56SJR25XX4jp2yR8"
},
"quotes": {
"min_length": 1,