- Updated gunicorn.conf.py to read host/port from config.json - Added gunicorn section to config.json for server settings - Created start_gunicorn.py as alternative launcher - Updated config.json with server settings (127.0.0.1:6969) - Updated documentation with new startup options
80 lines
2.1 KiB
JSON
80 lines
2.1 KiB
JSON
{
|
|
"app": {
|
|
"name": "ircquotes",
|
|
"host": "127.0.0.1",
|
|
"port": 6969,
|
|
"debug": false
|
|
},
|
|
"gunicorn": {
|
|
"workers": 4,
|
|
"timeout": 30,
|
|
"keepalive": 5,
|
|
"max_requests": 1000,
|
|
"preload": true
|
|
},
|
|
"database": {
|
|
"uri": "sqlite:///quotes.db?timeout=20",
|
|
"pool_timeout": 20,
|
|
"pool_recycle": -1,
|
|
"pool_pre_ping": true
|
|
},
|
|
"security": {
|
|
"csrf_enabled": true,
|
|
"csrf_time_limit": null,
|
|
"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",
|
|
"x_xss_protection": "1; mode=block",
|
|
"strict_transport_security": "max-age=31536000; includeSubDomains",
|
|
"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"
|
|
},
|
|
"quotes": {
|
|
"min_length": 10,
|
|
"max_length": 5000,
|
|
"per_page": 25,
|
|
"auto_approve": false,
|
|
"allow_html": false
|
|
},
|
|
"features": {
|
|
"voting_enabled": true,
|
|
"flagging_enabled": true,
|
|
"copy_quotes_enabled": true,
|
|
"dark_mode_enabled": true,
|
|
"api_enabled": true,
|
|
"bulk_moderation_enabled": true
|
|
},
|
|
"logging": {
|
|
"level": "WARNING",
|
|
"format": "%(asctime)s [%(levelname)s] %(message)s"
|
|
}
|
|
} |