Merge pull request #1855 from matrix-org/dbkr/usercontent_replace_document_origin

Replace document.origin with window.location.origin
This commit is contained in:
Luke Barnard 2018-04-26 11:05:39 +01:00 committed by GitHub
commit 6c9bf17bfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -337,7 +337,7 @@ module.exports = React.createClass({
if (this.context.appConfig && this.context.appConfig.cross_origin_renderer_url) { if (this.context.appConfig && this.context.appConfig.cross_origin_renderer_url) {
renderer_url = 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 ( return (
<span className="mx_MFileBody"> <span className="mx_MFileBody">
<div className="mx_MFileBody_download"> <div className="mx_MFileBody_download">