Disable websecurity for webview
Only for source code. This option should not be enabled to prevent XSS. ref: #35, #55 and #59
This commit is contained in:
@@ -219,6 +219,10 @@ var MattermostView = React.createClass({
|
||||
var thisObj = this;
|
||||
var webview = ReactDOM.findDOMNode(this.refs.webview);
|
||||
|
||||
// This option disables the same-origin policy and allows js/css/plugins not only content like images.
|
||||
// So this should not be enabled.
|
||||
webview.setAttribute('disablewebsecurity', true);
|
||||
|
||||
webview.addEventListener('did-fail-load', function(e) {
|
||||
console.log(thisObj.props.name, 'webview did-fail-load', e);
|
||||
if (e.errorCode === -3) { // An operation was aborted (due to user action).
|
||||
|
Reference in New Issue
Block a user