forked from rDrama/rDrama
fdssfd
parent
391a054e69
commit
dafb429822
|
@ -81,7 +81,7 @@ class CustomRenderer(HTMLRenderer):
|
||||||
|
|
||||||
if not user: return f"{space}@{target}"
|
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):
|
def render_sub_mention(self, token):
|
||||||
space = token.target[0]
|
space = token.target[0]
|
||||||
|
|
|
@ -265,6 +265,7 @@ def static_service(path):
|
||||||
@app.get('/hostedimages/<path:path>')
|
@app.get('/hostedimages/<path:path>')
|
||||||
@limiter.exempt
|
@limiter.exempt
|
||||||
def images(path):
|
def images(path):
|
||||||
|
print('wtf')
|
||||||
resp = make_response(send_from_directory('./images', path.replace('.WEBP','.webp')))
|
resp = make_response(send_from_directory('./images', path.replace('.WEBP','.webp')))
|
||||||
resp.headers.remove("Cache-Control")
|
resp.headers.remove("Cache-Control")
|
||||||
resp.headers.add("Cache-Control", "public, max-age=2628000")
|
resp.headers.add("Cache-Control", "public, max-age=2628000")
|
||||||
|
|
Loading…
Reference in New Issue