I have two separate websites. I want to show a particular page from one website (Site A) as an iframe on a particular page in another website (Site B). However, I keep getting the following error:
The loading of “https://site-a.com/some-page.php” in a frame is denied by “X-Frame-Options“ directive set to “SAMEORIGIN“.
I have set the following headers on https://site-a.com/some-page.php
:
header('Access-Control-Allow-Origin: https://site-b.com');
header('Access-Control-Allow-Credentials: true');
What can I do to show the page from Site A properly inside an iframe?
Thanks.