forked from rDrama/rDrama
fdsfd
parent
1276bc3531
commit
e005b8b06b
|
@ -262,10 +262,11 @@ def static_service(path):
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
@app.get('/images/<path:path>')
|
@app.get('/images/<path:path>')
|
||||||
|
@app.get('/IMAGES/<path:path>')
|
||||||
@app.get('/hostedimages/<path:path>')
|
@app.get('/hostedimages/<path:path>')
|
||||||
@limiter.exempt
|
@limiter.exempt
|
||||||
def images(path):
|
def images(path):
|
||||||
resp = make_response(send_from_directory('/images', path))
|
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")
|
||||||
if request.path.endswith('.webp'):
|
if request.path.endswith('.webp'):
|
||||||
|
|
Loading…
Reference in New Issue