a frame because it set ‘X-Frame-Options‘ to ‘deny‘
在spring security配置的位置添加
http.headers().frameOptions().disable();
protected void configure(HttpSecurity http) throws Exception { http.headers().frameOptions().disable(); http.authorizeRequests() .antMatchers("/login", "/logout", "/getVerifyCode", "/validateVerifyCode") .permitAll() .anyRequest().authenticated() .and() .formLogin() .loginPage("/login") .successForwardUrl("/success") .failureForwardUrl("/failure") .and() .logout() .logoutUrl("/logout") .invalidateHttpSession(true) .and() .csrf().disable(); }
Spring boot X-Frame-Options 异常 a frame because it set 'X-Frame-Options' to 'deny'
原文地址:https://www.cnblogs.com/yangchongxing/p/12284022.html
时间: 2024-10-09 10:24:42