diff --git a/src/main/java/com/generation/greengen/security/BasicSecurityConfig.java b/src/main/java/com/generation/greengen/security/BasicSecurityConfig.java index dba642f..25094cd 100644 --- a/src/main/java/com/generation/greengen/security/BasicSecurityConfig.java +++ b/src/main/java/com/generation/greengen/security/BasicSecurityConfig.java @@ -59,7 +59,7 @@ SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests( (auth) -> auth.requestMatchers("/usuarios/logar").permitAll().requestMatchers("/usuarios/cadastrar") - .permitAll().requestMatchers("/produtos").permitAll().requestMatchers("/error/**").permitAll() + .permitAll().requestMatchers(HttpMethod.GET,"/produto").permitAll().requestMatchers("/error/**").permitAll() .requestMatchers(HttpMethod.OPTIONS).permitAll().anyRequest().authenticated()) .authenticationProvider(authenticationProvider()) .addFilterBefore(authFilter, UsernamePasswordAuthenticationFilter.class).httpBasic(withDefaults());