gpt4 book ai didi

symfony - FOSUser 捆绑 check_path 与本地化

转载 作者:行者123 更新时间:2023-12-02 21:24:25 26 4
gpt4 key购买 nike

如何使用用户区域设置登录路径?我试过了

check_path: /{_locale}/login_check

check_path:     /(en|ru)/login_check

但什么也没有((

路由配置

fos_user_security:
resource: "@FOSUserBundle/Resources/config/routing/security.xml"
prefix: /{_locale}

异常(exception):

You must configure the check path to be handled by the firewall using form_login in your security firewall configuration.

最佳答案

在防火墙配置中使用路由而不是路径:

   security:
firewalls:
main:
form_login:
provider: fos_userbundle
login_path: fos_user_security_login
check_path: fos_user_security_check
csrf_provider: form.csrf_provider

link to topic in symfony forum

关于symfony - FOSUser 捆绑 check_path 与本地化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8635744/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com