This commit is contained in:
Aevann1 2021-12-11 19:38:16 +02:00
parent 7b0e618548
commit 1b2d2e96be
8 changed files with 42 additions and 40 deletions

View file

@ -266,7 +266,7 @@ def static_service(path):
@app.get('/hostedimages/<path:path>')
@limiter.exempt
def images(path):
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.add("Cache-Control", "public, max-age=2628000")
if request.path.endswith('.webp'):