Skip to content

Commit

Permalink
Merge pull request #444 from ethereum/yann300-patch-9
Browse files Browse the repository at this point in the history
revert allow_same_origin
  • Loading branch information
yann300 authored May 18, 2023
2 parents 0f0e869 + b89cb87 commit ad32d3d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/engine/web/src/lib/iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ export class IframePlugin extends PluginConnector {
private origin: string
private source: Window
private url: string
private allowSame0rigin: boolean

constructor(public profile: IframeProfile, private allowSame0rigin: boolean = true) {
constructor(public profile: IframeProfile) {
super(profile)
this.allowSame0rigin = allowSame0rigin
}

/** Implement "activate" of the ViewPlugin */
Expand Down Expand Up @@ -75,7 +73,7 @@ disconnect() {
if (this.iframe.contentWindow) {
throw new Error(`${this.name} plugin is already rendered`)
}
this.iframe.setAttribute('sandbox', `allow-popups allow-scripts ${this.allowSame0rigin ? 'allow-same-origin' : ''} allow-forms allow-top-navigation`)
this.iframe.setAttribute('sandbox', 'allow-popups allow-scripts allow-same-origin allow-forms allow-top-navigation')
this.iframe.setAttribute('seamless', 'true')
this.iframe.setAttribute('id', `plugin-${this.name}`)
this.iframe.src = this.url
Expand Down

0 comments on commit ad32d3d

Please sign in to comment.