Skip to content

Commit

Permalink
Revert exception handling code...
Browse files Browse the repository at this point in the history
  • Loading branch information
Portals committed Jun 16, 2024
1 parent 55b4fd6 commit 6b6b3b4
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package it.chalmers.gamma.security;

import static org.springframework.security.web.header.writers.ClearSiteDataHeaderWriter.Directive.CACHE;
import static org.springframework.security.web.header.writers.ClearSiteDataHeaderWriter.Directive.COOKIES;

import it.chalmers.gamma.adapter.secondary.jpa.user.TrustedUserDetailsRepository;
import it.chalmers.gamma.adapter.secondary.jpa.user.UserJpaRepository;
import it.chalmers.gamma.app.admin.domain.AdminRepository;
Expand Down Expand Up @@ -42,6 +39,9 @@
import org.springframework.security.web.util.matcher.MediaTypeRequestMatcher;
import org.springframework.security.web.util.matcher.RegexRequestMatcher;

import static org.springframework.security.web.header.writers.ClearSiteDataHeaderWriter.Directive.CACHE;
import static org.springframework.security.web.header.writers.ClearSiteDataHeaderWriter.Directive.COOKIES;

@Configuration
public class SecurityFiltersConfig {

Expand Down Expand Up @@ -206,10 +206,6 @@ SecurityFilterChain webSecurityFilterChain(
.cors(Customizer.withDefaults())
.csrf((csrf) -> csrf.csrfTokenRequestHandler(new XorCsrfTokenRequestAttributeHandler()))
.requestCache(cacheConfig -> cacheConfig.requestCache(requestCache))
.exceptionHandling(
exceptionConfig ->
exceptionConfig.accessDeniedHandler(
(request, response, accessDeniedException) -> response.sendRedirect("/")))
.headers(
headers ->
headers.contentSecurityPolicy(
Expand Down

0 comments on commit 6b6b3b4

Please sign in to comment.