diff options
author | Matthew Shao <me@matshao.com> | 2017-08-12 19:36:43 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-08-12 19:36:43 +0800 |
commit | e925015d10e554534b64f8b9fc16588a4c90fde1 (patch) | |
tree | 1c43cfb6e4b845dc404314e526fe30aa55dd2a23 /web/src/js/flow | |
parent | 1b129b50990ce253f2b9e96902ef2330e804162e (diff) | |
download | mitmproxy-e925015d10e554534b64f8b9fc16588a4c90fde1.tar.gz mitmproxy-e925015d10e554534b64f8b9fc16588a4c90fde1.tar.bz2 mitmproxy-e925015d10e554534b64f8b9fc16588a4c90fde1.zip |
[web] Update fetch api to suite the static mode.
Diffstat (limited to 'web/src/js/flow')
-rw-r--r-- | web/src/js/flow/utils.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/web/src/js/flow/utils.js b/web/src/js/flow/utils.js index 3c38058e..9d4e1012 100644 --- a/web/src/js/flow/utils.js +++ b/web/src/js/flow/utils.js @@ -49,7 +49,14 @@ export var MessageUtils = { } else if (message === flow.response) { message = "response"; } - return `/flows/${flow.id}/${message}/content` + (view ? `/${view}` : ''); + if (global.MITMWEB_STATIC) { + let url = view ? + `/flows/${flow.id}/${message}/content/${view}` : + `/flows/${flow.id}/${message}/_content` + return url; + } else { + return `/flows/${flow.id}/${message}/content` + (view ? `/${view}` : ''); + } } }; |