diff --git a/app/main/routes.py b/app/main/routes.py index c4cc18e8..746ecb2f 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -14,8 +14,8 @@ from flask_babel import _, get_locale from sqlalchemy import select, desc from sqlalchemy_searchable import search from app.utils import render_template, get_setting, gibberish, request_etag_matches, return_304, blocked_domains, \ - ap_datetime, ip_address -from app.models import Community, CommunityMember, Post, Site, User, utcnow + ap_datetime, ip_address, retrieve_block_list +from app.models import Community, CommunityMember, Post, Site, User, utcnow, Domain @bp.route('/', methods=['HEAD', 'GET', 'POST']) diff --git a/app/utils.py b/app/utils.py index bad7cd1d..97976e54 100644 --- a/app/utils.py +++ b/app/utils.py @@ -274,7 +274,7 @@ def blocked_domains(user_id) -> List[int]: def retrieve_block_list(): try: - response = requests.get('https://github.com/rimu/no-qanon/blob/master/domains.txt', timeout=1) + response = requests.get('https://raw.githubusercontent.com/rimu/no-qanon/master/domains.txt', timeout=1) except: return None if response and response.status_code == 200: diff --git a/env.sample b/env.sample index 86606b96..254f99a7 100644 --- a/env.sample +++ b/env.sample @@ -8,3 +8,5 @@ MODE='development' FULL_AP_CONTEXT=True CACHE_TYPE='FileSystemCache' CACHE_DIR='/dev/shm/pyfedi' +CELERY_BROKER_URL='redis://localhost:6379/1' +CACHE_REDIS_URL='redis://localhost:6379/1' diff --git a/requirements.txt b/requirements.txt index ac553224..513dde0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,3 +28,4 @@ opengraph-parse==0.0.6 feedgen==0.9.0 celery==5.3.6 redis==5.0.1 +Werkzeug==2.3.3