master
Aevann1 2021-12-11 19:44:29 +02:00
parent 391a054e69
commit dafb429822
2 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,7 @@ class CustomRenderer(HTMLRenderer):
if not user: return f"{space}@{target}"
return f'''{space}<a href="{user.url}"><img alt="@{username}'s profile picture" loading="lazy" src="/uid/{user.id}/pic" class="pp20">@{user.username}</a>'''
return f'''{space}<a href="{user.url}"><img alt="@{user.username}'s profile picture" loading="lazy" src="/uid/{user.id}/pic" class="pp20">@{user.username}</a>'''
def render_sub_mention(self, token):
space = token.target[0]

View File

@ -265,6 +265,7 @@ def static_service(path):
@app.get('/hostedimages/<path:path>')
@limiter.exempt
def images(path):
print('wtf')
resp = make_response(send_from_directory('./images', path.replace('.WEBP','.webp')))
resp.headers.remove("Cache-Control")
resp.headers.add("Cache-Control", "public, max-age=2628000")