This commit is contained in:
Aevann1 2022-02-25 14:43:25 +02:00
parent 078c2f26cf
commit 89d3f73881
24 changed files with 56 additions and 55 deletions

View file

@ -336,7 +336,8 @@ def archives(path):
@app.get('/e/<emoji>')
@limiter.exempt
def emoji(emoji):
resp = make_response(send_from_directory('assets/images/emojis', f'{emoji}.webp'))
if not emoji.endswith('.webp'): emoji += '.webp'
resp = make_response(send_from_directory('assets/images/emojis', emoji))
resp.headers.remove("Cache-Control")
resp.headers.add("Cache-Control", "public, max-age=3153600")
resp.headers.remove("Content-Type")