mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Make staging widgets work with live and vice versa.
This commit is contained in:
parent
006919cb44
commit
2ff1888054
@ -72,8 +72,17 @@ export default React.createClass({
|
|||||||
|
|
||||||
// Returns true if props.url is a scalar URL, typically https://scalar.vector.im/api
|
// Returns true if props.url is a scalar URL, typically https://scalar.vector.im/api
|
||||||
isScalarUrl: function() {
|
isScalarUrl: function() {
|
||||||
const scalarUrl = SdkConfig.get().integrations_rest_url;
|
let scalarUrls = SdkConfig.get().integrations_widgets_urls;
|
||||||
return scalarUrl && this.props.url.startsWith(scalarUrl);
|
if (!scalarUrls || scalarUrls.length == 0) {
|
||||||
|
scalarUrls = [SdkConfig.get().integrations_rest_url];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < scalarUrls.length; i++) {
|
||||||
|
if (this.props.url.startsWith(scalarUrls[i])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
isMixedContent: function() {
|
isMixedContent: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user