I've heard that you can bypass a "blocked a frame with origin from accessing a cross-origin frame" with postMessage() and I've been trying to use it, but it's not working properly. What am I doing wrong?
<iframe src="www.example.com" id = "theID"></iframe>
document.getElementById('theID').contentWindow.postMessage({
document.querySelector("input[value='true']").click();
});
You can use your server as a proxy. Assuming that you intend to load page XYZ inside the iframe, you can create an XYZ.php page which sends a request to XYZ and displays the response in the page. You will need to resolve the problems which might arise from relative URLs. Also, make sure that whatever you do is goodwilling and legal.
The flow will look like this: