关于springboot html页面使用跨域iframe 的问题!
我们的springboot 2.0.3项目需要链接别的系统的页面,在我们系统里展示。然后用html的iframe
<iframe id="reportFrame" width="100%" height="600" src="http://xxxx:8888/xxxxxx.xxx"/>
结果浏览器报错:
Refused to display 'http://xxxx:8888/xxxxxx.xxx' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
查了一下都说是跨域问题,在spring security位置添加配置就可以解决,但是我们权限使用的是shiro。
不知道这个问题怎么解决,找半天网上也没确切的答案。