标签:boot spring ever mat verify val cep options authorize
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'
标签:boot spring ever mat verify val cep options authorize
原文地址:https://www.cnblogs.com/yangchongxing/p/12284022.html