springboot 整合security 页面报 Refuse to display ‘’ in a frame because it set ‘X-Frame-Options’ to ‘deny’

解决方法:
在安全配置类中加入一下代码即可
http.headers().frameOptions().disable();
本文详细介绍了在使用SpringBoot整合Security时遇到的'X-Frame-Options'设置为'deny'导致页面无法在iframe中显示的问题,并提供了解决方案。只需在安全配置类中加入特定代码即可禁用frame选项。
springboot 整合security 页面报 Refuse to display ‘’ in a frame because it set ‘X-Frame-Options’ to ‘deny’

解决方法:
在安全配置类中加入一下代码即可
http.headers().frameOptions().disable();
3190
3万+
1万+
2万+
2万+
6万+
1万+
3740

被折叠的 条评论
为什么被折叠?