Nothing will unset X-Frame-Options (Apache, PHP 5.3)

前端 未结 4 2066
栀梦
栀梦 2021-01-11 18:35

I\'m trying to implement an embeddable widget, functioning similar to a Twitter embedded tweet. The simplest solution, though maybe not the best, appears to be an iframe or

相关标签:
4条回答
  • 2021-01-11 19:16

    X-Frame-Options was forced in by ssl.conf.

    Commenting out and restarting Apache allowed .htaccess and PHP header management to work again.

    0 讨论(0)
  • 2021-01-11 19:19

    Just in case if you want to modify this in .htaccess this will be the way:

    Header always unset X-Frame-Options env=HTTPS;
    
    0 讨论(0)
  • 2021-01-11 19:26

    I had the same problem, and I solved writing this in httpd.conf

    Header append X-Frame-Options ALLOWALL
    

    also I had to configured the header module to be loaded, in order to apache to understand this directive. Then you must restart httpd.

    0 讨论(0)
  • 2021-01-11 19:26

    Consider the following experiment:

    Header always set X-Frame-Options "DENY"
    Header unset X-Frame-Options
    Header set set X-Frame-Options "TEST"
    

    response headers:

    X-Frame-Options "DENY"
    X-Frame-Options "TEST"
    

    Second experiment:

    Header set X-Frame-Options "DENY"
    Header unset X-Frame-Options
    Header set set X-Frame-Options "TEST"
    

    response headers:

    X-Frame-Options "TEST"
    

    Conclusion: the always option blocks the original value from being unset, however it doesn't block from adding a new value.

    0 讨论(0)
提交回复
热议问题