From dc7678e323c2ff5849d76f9bd6e1224999f7f7c3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 10 Dec 2021 22:40:05 +0200 Subject: [PATCH] sfdsfd --- files/routes/users.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/files/routes/users.py b/files/routes/users.py index 034461183..adc32dca1 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -817,18 +817,7 @@ def user_profile_uid(id): try: id = int(id, 36) except: abort(404) x=get_account(id) - - purl = x.profile_url - if not purl.startswith(f'{request.host_url}images/'): return redirect(purl) - - path = purl.split('images/')[1] - resp = make_response(send_from_directory('/images', path)) - resp.headers.remove("Cache-Control") - resp.headers.add("Cache-Control", "public, max-age=2628000") - if request.path.endswith('.webp'): - resp.headers.remove("Content-Type") - resp.headers.add("Content-Type", "image/webp") - return resp + return redirect(x.profile_url) @app.get("/@/pic") @limiter.exempt