terminado. trabajando en el carrito. falta mensaje de ya añadido

This commit is contained in:
2025-10-17 13:31:09 +02:00
parent 46715d1017
commit 06e03afa04
21 changed files with 251 additions and 113 deletions

View File

@ -113,8 +113,12 @@ public class SecurityConfig {
RequestMatcher notStatic = new AndRequestMatcher(
new NegatedRequestMatcher(PathRequest.toStaticResources().atCommonLocations()),
new NegatedRequestMatcher(pathStartsWith("/assets/")));
RequestMatcher cartCount = new AndRequestMatcher(
new NegatedRequestMatcher(PathRequest.toStaticResources().atCommonLocations()),
new NegatedRequestMatcher(pathStartsWith("/cart/count")));
cache.setRequestMatcher(new AndRequestMatcher(htmlPage, nonAjax, notStatic, notWellKnown));
cache.setRequestMatcher(new AndRequestMatcher(htmlPage, nonAjax, notStatic, notWellKnown, cartCount));
rc.requestCache(cache);
})
// ========================================================
@ -135,7 +139,8 @@ public class SecurityConfig {
"/presupuesto/public/**",
"/error",
"/favicon.ico",
"/.well-known/**" // opcional
"/.well-known/**", // opcional
"/api/pdf/presupuesto/**"
).permitAll()
.requestMatchers("/users/**").hasAnyRole("SUPERADMIN", "ADMIN")
.anyRequest().authenticated())