title: How Can I Bypass the X-Frame-Options
body: <p>Im trying when click link it will show a website in iframe but I got problem with x-frame-option. Then, I use <code>x-frame-bypass</code>. It working when I using in <strong>HTML</strong> like bellow.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;script src="https://unpkg.com/@ungap/custom-elements-builtin"&gt;&lt;/script&gt;
  &lt;script type="module" src="https://unpkg.com/x-frame-bypass"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;iframe is="x-frame-bypass" src="https://news.ycombinator.com/" name="myIframe"&gt;&lt;/iframe&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But, when I trying click link and open in iframe it not working. I'm using angular. Example code like bellow.</p>
  
  <p><strong>index.html</strong>
  </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;script src="https://unpkg.com/@ungap/custom-elements-builtin"&gt;&lt;/script&gt;
    &lt;script type="module" src="https://unpkg.com/x-frame-bypass"&gt;&lt;/script&gt;
    &lt;base href="/"&gt;
  
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="icon" type="image/x-icon" href="favicon.ico"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;my-app&gt;Loading...&lt;/my-app&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>app.component.html</strong></p>
  
  <pre><code>&lt;div style="text-align:center"&gt;
    &lt;h1&gt;
     Test Open URL in Iframe
    &lt;/h1&gt;
    &lt;a class="link-call" (click)="onTest('https://news.ycombinator.com/')" style="background:red;padding: 14px 25px;color:white;cursor:pointer"&gt;test&lt;/a&gt;
    &lt;/div&gt;
  
  
  &lt;iframe is="x-frame-bypass" width="100%" height="100%" frameBorder="0" [src]="urlSafe"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>name = 'Set iframe source';
    url: string;
    urlSafe: SafeResourceUrl;
  
    constructor(public sanitizer: DomSanitizer) { }
  
    ngOnInit() {
  
    }
    onTest(url){
      this.urlSafe= this.sanitizer.bypassSecurityTrustResourceUrl(url);
    }
  </code></pre>
  
  <p>This <a href="https://stackblitz.com/edit/angular-iframe-src-6ibdt6" rel="nofollow noreferrer">DEMO</a> for your reference</p>