avatar
The Most Hilarious Complaints We've Received About Replacing Sliding C

Guest 16 15th Mar, 2025

@Configuration
@EnableWebSecurity
public class SpringSecurityConfigurationBasicAuth extends WebSecurityConfigurerAdapter{

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
        .csrf().disable()
        .authorizeRequests()
        .antMatchers(HttpMethod.OPTIONS,"/**").permitAll()
                .anyRequest().authenticated()
                .and()
            //.formLogin().and()
            .httpBasic();
    }
}
Markup
Description

No description

To share this paste please copy this url and send to your friends
RAW Paste Data