Skip to content

Commit

Permalink
Merge pull request #15 from JuribaDev/fix-security-config
Browse files Browse the repository at this point in the history
Hot fix Security Config
  • Loading branch information
JuribaDev authored Aug 20, 2024
2 parents b6c95bd + 437d1c1 commit 18354d2
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
.requestMatchers(securityPathConfig.publicPathsMatcher()).permitAll()
.requestMatchers(securityPathConfig.adminPathsMatcher()).hasRole("ADMIN")
.anyRequest().authenticated()


)
.csrf(AbstractHttpConfigurer::disable)
.headers(headers -> headers.frameOptions(HeadersConfigurer.FrameOptionsConfig::disable))
Expand All @@ -79,7 +77,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
.exceptionHandling(exceptions -> exceptions
.authenticationEntryPoint(customAuthenticationEntryPoint))
.addFilterBefore(new RateLimitingFilter(rateLimitingService,objectMapper), UsernamePasswordAuthenticationFilter.class)
.addFilterAfter(jwtAuthenticationFilter(), AuthorizationFilter.class);
.addFilterAfter(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);


return http.build();
Expand Down

0 comments on commit 18354d2

Please sign in to comment.