Refused to display 'http://localhost:8080/xxx' in a frame because it set 'X-Frame-Options' to 'DENY'

Spring Security4默认是将'X-Frame-Options' 设置为 'DENY' 所以重新配置下SpringSecurity, 在标签内添加配置:

再次访问网站就不会出现这个问题了; 下面是一些其他配置: 他的值有三个:

(1)DENY — 表示该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。

(2)SAMEORIGIN — 表示该页面可以在相同域名页面的 frame 中展示。

(3)ALLOW-FROM https://example.com/ — 表示该页面可以在指定来源的 frame 中展示

 

Refused to display 'http://localhost:8080/xxx' in a frame because it set 'X-Frame-Options' to 'DENY'_第1张图片

你可能感兴趣的:(Refused to display 'http://localhost:8080/xxx' in a frame because it set 'X-Frame-Options' to 'DENY')