Skip to content
Web Component extending IFrame to bypass X-Frame-Options: deny/sameorigin
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md Rename X-Frame to X-Frame-Bypass Jan 7, 2019
index.html Rename X-Frame to X-Frame-Bypass Jan 7, 2019
package.json Add sandbox to prevent frame busting Jan 8, 2019
x-frame-bypass.js Add sandbox to prevent frame busting Jan 8, 2019

README.md

X-Frame-Bypass

Published on webcomponents.org

X-Frame-Bypass is a Web Component, specifically a Customized Built-in Element, which extends an IFrame to bypass the X-Frame-Options: deny/sameorigin response header. Normally such headers prevent embedding a web page in an <iframe> element, but X-Frame-Bypass is using a CORS proxy to allow this.

Usage

  1. (Optional) Include the Custom Elements with Built-in Extends polyfill for Safari:

     <script src="https://unpkg.com/@ungap/custom-elements-builtin"></script>
    
  2. Include the X-Frame-Bypass JS module:

     <script type="module" src="https://unpkg.com/x-frame-bypass"></script>
    
  3. Insert the X-Frame-Bypass Custom Element:

     <iframe is="x-frame-bypass" src="https://example.org/"></iframe>
    

Demo

See the Hacker News using X-Frame-Bypass. Supported are current versions of Chrome and Firefox browsers. Edge and Safari do not support Customized Built-in Elements yet.

License

© 2019 Jerzy Głowacki under Apache License 2.0.

You can’t perform that action at this time.