leyes
This commit is contained in:
parent
4de22dec1b
commit
ddcdbc779b
|
|
@ -30,13 +30,16 @@ public class SecurityConfig {
|
||||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||||
http
|
http
|
||||||
.csrf(csrf -> csrf.ignoringRequestMatchers("/webhook/stripe"))
|
.csrf(csrf -> csrf.ignoringRequestMatchers("/webhook/stripe"))
|
||||||
|
.headers(headers -> headers
|
||||||
|
.frameOptions(frame -> frame.sameOrigin())
|
||||||
|
)
|
||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
// Recursos públicos
|
// Recursos públicos
|
||||||
.requestMatchers(
|
.requestMatchers(
|
||||||
"/", "/inicio", "/login", "/registro",
|
"/", "/inicio", "/login", "/registro",
|
||||||
"/leyes", "/noticias", "/acceso-denegado", "/error",
|
"/leyes", "/noticias", "/acceso-denegado", "/error",
|
||||||
"/webhook/stripe",
|
"/webhook/stripe",
|
||||||
"/css/**", "/js/**", "/images/**", "/favicon.ico"
|
"/css/**", "/js/**", "/images/**", "/leyes/**", "/favicon.ico"
|
||||||
).permitAll()
|
).permitAll()
|
||||||
// Panel de administración
|
// Panel de administración
|
||||||
.requestMatchers("/admin/**").hasRole("ADMIN")
|
.requestMatchers("/admin/**").hasRole("ADMIN")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue