【发布时间】:2014-12-15 14:43:07
【问题描述】:
阻止来源为https://xxxx 的框架访问来源为https://xxx 的框架。协议、域和端口必须匹配。
我需要此设置才能工作,并且我可以访问这两个域(2 个不同的域)。
我怎样才能摆脱这个?
我尝试将php-header 放在放置iframe 的页面上:
header("Access-Control-Allow-Origin: https://domain_the_iframe_is_placed");
还有在 htaccess 中:
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
我能做什么?
这是 iframe 页面,它位于另一个域 (y.com) 上,但放在 x.com 上
parent.document.getElementById('accoxxation').value='<?=$_POST['account_verification']?>';
parent.document.getElementById('accxx').value='<?=$_POST['account_number']?>';
parent.document.getElementById('accxxonth').value='<?=$_POST['account_month']?>';
parent.document.getElementById('accxxxr').value='<?=$_POST['account_year']?>';
parent.document.getElementById('gatewayProcessor').submit();
【问题讨论】:
标签: javascript php .htaccess