From c872a5c70036fca4e4f91a879b98d8cd83ed2283 Mon Sep 17 00:00:00 2001 From: Cixtor Date: Tue, 17 Dec 2019 12:52:14 -0800 Subject: [PATCH] Fix #3571 to support image/webp in mitmweb to display previews --- web/src/js/components/ContentView/ContentViews.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/js/components/ContentView/ContentViews.jsx b/web/src/js/components/ContentView/ContentViews.jsx index 387c940af..4da81c8f3 100644 --- a/web/src/js/components/ContentView/ContentViews.jsx +++ b/web/src/js/components/ContentView/ContentViews.jsx @@ -7,7 +7,7 @@ import { MessageUtils } from '../../flow/utils' import CodeEditor from './CodeEditor' -const isImage = /^image\/(png|jpe?g|gif|vnc.microsoft.icon|x-icon)$/i +const isImage = /^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon)$/i ViewImage.matches = msg => isImage.test(MessageUtils.getContentType(msg)) ViewImage.propTypes = { flow: PropTypes.object.isRequired,