Reputation: 217
I have been trying to load an section of page using iframe
in my wordpress
site. I can load certain sites in the iframe
without any issue but while i try my required page it doesn't work as expected just inside the page. The iframe
src is loading perfectly if its opened individually
I have tried most of the answers mentioned here in stackoverflow
and other forums, still can't get a solution for this. I tried adding code in .htaccess
, also tried adding code in functions.php
This is the iframe
src I want to load.
It can be loaded individually in browser but not inside an iframe
. I am getting the following error in console while i try to load it :
[ERROR] Permission denied to access property "hash" on cross-origin object
Is this an issue with my code, server config or with the URL itself?
Thanks
Upvotes: 0
Views: 561
Reputation: 2654
It's about your source is blocking unauthorization call from domains not in CORS. They're only allow call from Origin https://ec.europa.eu. The short answer, you can't deal anything from your side.
More information about CORS: https://developer.mozilla.org/en/docs/Web/HTTP/Access_control_CORS
Upvotes: 1