redirection good

This commit is contained in:
Olivier PARPAILLON
2024-11-19 14:01:57 +01:00
parent 8ddbf9c5d6
commit 5744d77e70
5 changed files with 32 additions and 11 deletions

View File

@@ -22,12 +22,10 @@ security:
login_path: app_login
check_path: app_login
enable_csrf: true
default_target_path: home
always_use_default_target_path: true
logout:
path: app_logout
target: app_login
# where to redirect after logout
# target: app_any_route
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#the-firewall
@@ -38,8 +36,9 @@ security:
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
# - { path: ^/admin, roles: ROLE_ADMIN }
# - { path: ^/profile, roles: ROLE_USER }
- { path: ^/login, roles: PUBLIC_ACCESS }
- { path: ^/register, roles: PUBLIC_ACCESS }
- { path: ^/, roles: ROLE_USER }
when@test:
security: