Trying to remove/deny x-frame-options to sameorigin from an external URL, such as through an iframe? You can bypass it using an external library.
1 answers
1
Deny an external x-frame-options header
In order to deny an external x-frame-options header through an iframe, you should use this x-frame-bypass library paired with this custom elements builtin library, as per the example below.
<iframe is="x-frame-bypass" src="https://www.google.com/search?q=example"></iframe>
<script src="https://unpkg.com/@ungap/custom-elements-builtin"></script>
<script type="module" src="https://unpkg.com/x-frame-bypass"></script>
The above snippet is extremely useful if you’re looking to iframe a Google search listing result specifically.
— Support WizardAnswer 1