JavaScript Apache-2.0

x-frame-bypass

Web Component extending IFrame to bypass X-Frame-Options: deny/sameorigin

N

niutech

Dernière activité 11 févr. 2026
niutech/x-frame-bypass

753

étoiles

332

forks

23

issues ouvertes

custom-elementiframeweb-componentx-frame-options

Ce README est souvent en anglais.

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.

Projets similaires

Keep iframes sized to their content

JavaScriptcross-domaincross-originiframe
Ddavidjbradshaw
6,9 k étoiles964

Develop components in isolation with just an iframe

JavaScript
Bbluwy
580 étoiles12

uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean.

JavaScriptblockerbrowser-extensionchromium
Ggorhill
68,2 k étoiles4,4 k