I need load a page in a iframe or something like that, but, this page redirect to a login page that is in another domain, then, I have a cross-domain error!
The error is something like:
Failed to load https://otherdomain.com/159HBR321: Redirect from
'https://otherdomain.com/159HBR321' to
'https://thirddomain.com/home/login'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin'
header is present on the requested resource. Origin 'null' is
therefore not allowed access.
I tried something like:
$(function(){
$("#divId").load("https://otherdomain.com/159HBR321");
});
...
<div id="divId" style="display:none;"></div>
And tried with iframe:
<iframe src="https://otherdomain.com/159HBR321"></iframe>
I have a Java project, so I can solve this problem with Java or JS (JQuery, etc.).
But no success. Just a observation, I can't change anything on the otherdomain's server.
Any clue on how to solve this issue? Thanks in advance.