From 0b2d0a981de1b0f58587a10770e7c58930cf496b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 22 Jun 2022 17:54:25 +0200 Subject: [PATCH] fix broken images --- files/routes/static.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 707665d32..fe0716379 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -243,10 +243,10 @@ def emoji(emoji): resp.headers.add("Content-Type", "image/webp") return resp -@app.get('/i/') +@app.get('/i/') @limiter.exempt -def image(image): - resp = make_response(send_from_directory('assets/images', image)) +def image(path): + resp = make_response(send_from_directory('assets/images', path)) if request.path.endswith('.webp') or request.path.endswith('.gif') or request.path.endswith('.ttf') or request.path.endswith('.woff2'): resp.headers.remove("Cache-Control") resp.headers.add("Cache-Control", "public, max-age=3153600")