Skip to content

Commit

Permalink
Merge pull request #11 from GreenGen72/feature/rotas-de-produtos
Browse files Browse the repository at this point in the history
Allow GET requests for /produto
  • Loading branch information
ApenasGabs authored May 16, 2024
2 parents 3cda510 + 01452b5 commit 742c7d4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 742c7d4

Please sign in to comment.