Spring Boot不允许加载iframe问题解决
2017-01-13 00:00
555 查看
在spring boot项目中出现不能加载iframe
页面空白,或者ie显示不允许加载页面
报一个"Refused to display 'http://......' in a frame because it set 'X-Frame-Options' to 'DENY'. "错误
解决方式:
因spring Boot采取的java config,在配置spring security的位置添加:
页面空白,或者ie显示不允许加载页面
报一个"Refused to display 'http://......' in a frame because it set 'X-Frame-Options' to 'DENY'. "错误
解决方式:
因spring Boot采取的java config,在配置spring security的位置添加:
@Override protected void configure(HttpSecurity http) throws Exception { http.headers().frameOptions().disable(); http .csrf().disable() .authorizeRequests() .antMatchers("/suishoupai_search.do").hasRole("USER") .and() .formLogin() .failureUrl("/login?failed=true") .loginPage("/login") .permitAll() .and() .logout() .permitAll(); }
相关文章推荐
- Spring Boot不允许加载iframe问题解决
- Spring Boot不允许加载iframe问题解决【转】
- Spring Boot 不允许加载iframe问题解决
- Spring Boot不允许加载iframe问题解决
- 2. Spring Boot 1.2.5 不允许加载iframe问题解决
- Spring Boot下无法加载主类 org.apache.maven.wrapper.MavenWrapperMain问题解决
- spring boot 本地图片不能加载(图片路径)的问题及解决方法
- spring boot之解决懒加载session was closed问题
- Spring Boot下无法加载主类 org.apache.maven.wrapper.MavenWrapperMain问题解决
- 解决eclipse创建spring boot项目加载不到application.properties配置文件的问题
- IntelliJ IDEA搭建Springboot项目解决热加载问题
- 解决SpringBoot整合shiro之后无法加载静态资源文件问题
- hibernate 延迟加载(Lazy)问题spring下解决方法
- Spring+Hibernate+Struts之懒加载问题的解决
- 让spring帮助你在MVC层解决JPA的缓迟加载问题
- Spring使用OpenSessionInViewFilter解决Hibernate的lazy延时加载问题
- 使用clone解决hibernate+spring集成中的延迟加载问题及分析(no session or session was closed)
- 使用clone解决hibernate+spring集成中的延迟加载问题及分析(no session or session was closed)
- Spring+Hibernate+Struts之懒加载问题的解决
- 让spring帮助你在MVC层解决JPA的缓迟加载问题