场景描述:

odoo界面嵌入iframe,Refused to display in a frame because it set 'X-Frame-Options' to 'DENY'

跨域请求失败处理!

处理过程

修改目标访问服务器的nginx或者apache的配置文件,这里用的apache;

具体参数配置参考:https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

需要在apache httpd.conf中末尾增加如下配置:

Header set X-Frame-Options "allow-from http://www.yousite.com你系统的域名"

并且将 #LoadModule headers_module 前面的 # 号去掉。

重启apache服务,OK!

 

参考:

http://www.webkaka.com/tutorial/server/2018/020623/

http://www.webkaka.com/tutorial/server/2018/012919/

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-21
  • 2021-12-26
  • 2022-12-23
  • 2021-05-08
  • 2022-01-11
  • 2022-12-23
  • 2021-08-09
相关资源
相似解决方案