chore: disable temporary security
parent
8c7e039794
commit
b953d8eab3
|
@ -52,21 +52,21 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http
|
||||
.cors().configurationSource(request -> {
|
||||
var configuration = new CorsConfiguration();
|
||||
configuration.setAllowedOrigins(List.of("*"));
|
||||
configuration.setAllowedMethods(List.of("GET", "POST"));
|
||||
configuration.setAllowedHeaders(List.of("*"));
|
||||
return configuration;
|
||||
})
|
||||
.and()
|
||||
.csrf().disable()
|
||||
.exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()
|
||||
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
|
||||
.authorizeRequests().antMatchers("/auth/**").permitAll()
|
||||
.anyRequest().authenticated();
|
||||
|
||||
http.addFilterBefore(authenticationJwtTokenFilter(), UsernamePasswordAuthenticationFilter.class);
|
||||
// http
|
||||
// .cors().configurationSource(request -> {
|
||||
// var configuration = new CorsConfiguration();
|
||||
// configuration.setAllowedOrigins(List.of("*"));
|
||||
// configuration.setAllowedMethods(List.of("GET", "POST"));
|
||||
// configuration.setAllowedHeaders(List.of("*"));
|
||||
// return configuration;
|
||||
// })
|
||||
// .and()
|
||||
// .csrf().disable()
|
||||
// .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()
|
||||
// .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
|
||||
// .authorizeRequests().antMatchers("/auth/**").permitAll()
|
||||
// .anyRequest().authenticated();
|
||||
//
|
||||
// http.addFilterBefore(authenticationJwtTokenFilter(), UsernamePasswordAuthenticationFilter.class);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue