Merge pull request #12369 from diegocr/dev

add explicit content-type header for image/webp
This commit is contained in:
AUTOMATIC1111 2023-08-06 17:52:28 +03:00 committed by GitHub
commit 5a38a9c0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,6 +41,9 @@ warnings.filterwarnings("default" if opts.show_gradio_deprecation_warnings else
mimetypes.init()
mimetypes.add_type('application/javascript', '.js')
# Likewise, add explicit content-type header for certain missing image types
mimetypes.add_type('image/webp', '.webp')
if not cmd_opts.share and not cmd_opts.listen:
# fix gradio phoning home
gradio.utils.version_check = lambda: None