Uncaught DOMException: Permission denied to access property "hostname" on cross-origin object

Created on 8 November 2023, about 1 year ago
Updated 15 December 2023, about 1 year ago

Problem/Motivation

When trying to embed a Drupal page into an external iframe the external site is throwing an error at seckit.document_write.js file on line 5 where it cannot access the top.location.hostname. This prevents the page content from getting rendered. Is there a way to prevent it?

Steps to reproduce

1. Add the external domain to the frame-ancestors policy.
2. Create the iframe in the external site (e.g: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe) adding the Drupal page URL at the src attribute.
3. Load the page of the external website that contains the iframe.

💬 Support request
Status

Active

Version

2.0

Component

Code

Created by

🇪🇸Spain gpollner Barcelona

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024