mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
issues found during deployment
This commit is contained in:
parent
ef21e246eb
commit
195901975f
4 changed files with 6 additions and 3 deletions
|
@ -14,8 +14,8 @@ from flask_babel import _, get_locale
|
||||||
from sqlalchemy import select, desc
|
from sqlalchemy import select, desc
|
||||||
from sqlalchemy_searchable import search
|
from sqlalchemy_searchable import search
|
||||||
from app.utils import render_template, get_setting, gibberish, request_etag_matches, return_304, blocked_domains, \
|
from app.utils import render_template, get_setting, gibberish, request_etag_matches, return_304, blocked_domains, \
|
||||||
ap_datetime, ip_address
|
ap_datetime, ip_address, retrieve_block_list
|
||||||
from app.models import Community, CommunityMember, Post, Site, User, utcnow
|
from app.models import Community, CommunityMember, Post, Site, User, utcnow, Domain
|
||||||
|
|
||||||
|
|
||||||
@bp.route('/', methods=['HEAD', 'GET', 'POST'])
|
@bp.route('/', methods=['HEAD', 'GET', 'POST'])
|
||||||
|
|
|
@ -274,7 +274,7 @@ def blocked_domains(user_id) -> List[int]:
|
||||||
|
|
||||||
def retrieve_block_list():
|
def retrieve_block_list():
|
||||||
try:
|
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:
|
except:
|
||||||
return None
|
return None
|
||||||
if response and response.status_code == 200:
|
if response and response.status_code == 200:
|
||||||
|
|
|
@ -8,3 +8,5 @@ MODE='development'
|
||||||
FULL_AP_CONTEXT=True
|
FULL_AP_CONTEXT=True
|
||||||
CACHE_TYPE='FileSystemCache'
|
CACHE_TYPE='FileSystemCache'
|
||||||
CACHE_DIR='/dev/shm/pyfedi'
|
CACHE_DIR='/dev/shm/pyfedi'
|
||||||
|
CELERY_BROKER_URL='redis://localhost:6379/1'
|
||||||
|
CACHE_REDIS_URL='redis://localhost:6379/1'
|
||||||
|
|
|
@ -28,3 +28,4 @@ opengraph-parse==0.0.6
|
||||||
feedgen==0.9.0
|
feedgen==0.9.0
|
||||||
celery==5.3.6
|
celery==5.3.6
|
||||||
redis==5.0.1
|
redis==5.0.1
|
||||||
|
Werkzeug==2.3.3
|
||||||
|
|
Loading…
Reference in a new issue