diff --git a/src/components/views/messages/MFileBody.js b/src/components/views/messages/MFileBody.js index c5a01721d3..be04aa2c92 100644 --- a/src/components/views/messages/MFileBody.js +++ b/src/components/views/messages/MFileBody.js @@ -337,7 +337,7 @@ module.exports = React.createClass({ if (this.context.appConfig && this.context.appConfig.cross_origin_renderer_url) { renderer_url = this.context.appConfig.cross_origin_renderer_url; } - renderer_url += "?origin=" + encodeURIComponent(document.origin); + renderer_url += "?origin=" + encodeURIComponent(window.location.origin); return (