<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-4.1.xsd">
……
<security:http ……>
<!-- 设置允许嵌套iframe -->
<security:headers><security:frame-options disabled="true"/></security:headers>
<security:http />
……
</beans>
spring-security 4.1 设置允许嵌套页面上的iframe
最新推荐文章于 2026-06-21 16:47:27 发布
本文介绍如何使用Spring Security配置HTTP安全,特别关注通过设置header来允许页面被嵌套在iframe中。此配置对于需要将网站部分功能集成到其他应用作为iframe的情况非常有用。
146

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



