dongzanghui4624 2015-04-21 12:22
浏览 75
已采纳

使用CORS在ZendFramework 1.12中重定向

A partner is calling our shop in an iFrame. And get this Error Message in Firefox:

Load dinied by X-Frame-Options: https://www.xyz.de/shop/katalog/index does not permit cross-origin framing.

Original he called the sendLogin/index site. So I think the Core request is working. But in this Controller there is a redirection to the katalog/index Controller:

$this->_redirect('katalog/index');

I'm not sure what to do or where I have to look.

  • 写回答

1条回答 默认 最新

  • dsimib1625 2015-04-23 11:15
    关注

    This is a security feature some servers send. It is used to help prevent XSS attacks.

    You need to add a header to change the value of the header being sent. Something like

    header('X-Frame-Options ALLOW-FROM uri');
    

    Replacing uri with the payment gateway uri.

    For more information you can read the Mozilla X-Frame-Options response header

    Edit

    To remove a previous header in php, use header_remove:

    header_remove('X-Frame-Options');
    

    However, this only works for headers that have been set by PHP. If the header is being set by the server then you will need to change the php.ini file to remove the above header.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?