有人可以帮我解决登录重定向中的这个问题吗?浏览器说该页面进行了太多重定向
这里我显示文件security.yml:
firewalls:
frontend:
pattern: ^/
anonymous: ~
form_login:
login_path: /login
check_path: /login_check
default_target_path: /index
success_handler: authentication_handler
logout:
path: /logout
target: /
success_handler: authentication_handler
security: true
remember_me:
key: sitio123
lifetime: 604800 # 7 * 24 * 3600 = 604.800 = 1 semana
access_denied_handler: accessdenied_handler
access_control:
- { path: ^/, roles: ROLE_U }
- { path: ^/admin, roles: ROLE_A }
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/pruebita, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/prueba, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/comprobarmail, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/nuevacontrasena, roles: IS_AUTHENTICATED_ANONYMOUSLY }
providers:
chain_provider:
providers: [in_memory, user_db]
in_memory:
users:
foo: { password: test, roles: 'ROLE_A' }
foo1: { password: test1, roles: 'ROLE_U' }
user_db:
entity: { class: mio\mioBundle\Entity\Empleado, property: username }
role_hierarchy:
ROLE_A: ROLE_U
encoders:
mio\mioBundle\Entity\Empleado: { algorithm: sha1 }
Symfony\Component\Security\Core\User\User: plaintext
非常感谢您的宝贵时间