niutech / x-frame-bypass

Web Component extending IFrame to bypass X-Frame-Options: deny/sameorigin
https://niutech.github.io/x-frame-bypass/
Apache License 2.0
669 stars 267 forks source link

it does not work for microsoft online word #44

Open yuseferi opened 2 years ago

yuseferi commented 2 years ago

thank you very much for your great module, but it's not working for microsoft office word online for example:

https://onedrive.live.com/edit.aspx?resid=5D099B6B963F20FB!118&ithint=file%2cdocx&wdOrigin=OFFICECOM-WEB.START.MRU

I cloned the repo to local and update index file to

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="X-Frame-Bypass: Web Component extending IFrame to bypass X-Frame-Options: deny/sameorigin">
    <title>X-Frame-Bypass Web Component Demo</title>
    <style>
        html, body {
            margin: 0;
            padding: 0;
            height: 100%;
            overflow: hidden;
        }
        iframe {
            display: block;
            width: calc(100% - 40px);
            height: calc(100% - 40px);
            margin: 20px;
        }
        img {
            position: absolute;
            top: 0;
            right: 0;
        }
    </style>
    <script src="https://unpkg.com/@ungap/custom-elements-builtin"></script>
    <script src="x-frame-bypass.js" type="module"></script>
</head>
<body>
    <iframe is="x-frame-bypass" src="https://onedrive.live.com/edit.aspx?resid=5D099B6B963F20FB!118&ithint=file%2cdocx&wdOrigin=OFFICECOM-WEB.START.MRU"></iframe>
    <a href="https://github.com/niutech/x-frame-bypass"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
</body>
</html>