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