Skip to content

Commit

Permalink
htmx strikes again
Browse files Browse the repository at this point in the history
  • Loading branch information
Portals committed Jun 16, 2024
1 parent 6b6b3b4 commit cc27193
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
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 @@ -39,9 +42,6 @@
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,6 +206,10 @@ 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
2 changes: 1 addition & 1 deletion app/src/main/resources/templates/pages/login.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<link rel="stylesheet" th:href="@{/css/login.css}" />
<img th:src="@{/img/bg.webp}" alt="Background image" _="on load transition opacity to 1.0 over 5 seconds"/>
<main>
<main hx-boost="false">
<article>
<header>
<h1>
Expand Down

0 comments on commit cc27193

Please sign in to comment.