mirror of
https://github.com/codl/forget
synced 2025-01-21 03:15:49 +01:00
ensure proper mimetype when serving webp images
This commit is contained in:
parent
c328332ff9
commit
88b559a2f1
3
app.py
3
app.py
@ -9,6 +9,7 @@ from flask_limiter import Limiter
|
|||||||
from flask_limiter.util import get_remote_address
|
from flask_limiter.util import get_remote_address
|
||||||
from lib import get_viewer
|
from lib import get_viewer
|
||||||
import os
|
import os
|
||||||
|
import mimetypes
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
@ -89,3 +90,5 @@ def install_security_headers(resp):
|
|||||||
resp.headers.set('x-xss-protection', '1')
|
resp.headers.set('x-xss-protection', '1')
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
|
mimetypes.add_type('image/webp', '.webp')
|
||||||
|
Loading…
Reference in New Issue
Block a user