簡體   English   中英

symfony2調試:盡管上下文相同,但在訪問其他防火牆后面的路由時,用戶將斷開連接

[英]symfony2 debugging: user gets disconnected when accessing routes behind other firewall despite same context

經過一些調試后,我了解到我的用戶已從匿名設置為false的防火牆下的任何路由斷開連接。

這很奇怪,因為這在我的本地計算機上沒有發生,並且到目前為止一切都很好。

如何進一步調試?

請注意,我為我的2個防火牆,publicone和發生問題的另一個防火牆指定了相同的上下文。

我的security.yml:

app / config / security.yml

security:
    # La valeur de « Strategy » peut être : affirmative, unanimous ou consensus
    access_decision_manager:
        strategy: unanimous
    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
        guest:
            pattern:        /(public/|$|genemu-captcha-refresh|media/cache/)
            anonymous:      true
            context:        main_auth
        main:
            http_basic: ~
            pattern:        ^/
            anonymous:      false
            provider:       main
            context:        main_auth
            switch_user: { role: ROLE_ADMIN, parameter: _switch_user_parameter }
            form_login:
                login_path: fos_user_security_login
                check_path: fos_user_security_check
                success_handler: authentication_site_handler
            logout:
                path:       fos_user_security_logout
                target:     /
            remember_me:
                key:      "%secret%"
                lifetime: 86400 #en secondes
                path:     /
                domain:   ~ # Prend la valeur par défaut du domaine courant depuis $_SERVER
            oauth:
                remember_me: true
                resource_owners:
                    facebook:           "/loginhwi/check-facebook"
                    github:             "/loginhwi/check-github"
                    google:             "/loginhwi/check-google"
                    twitter:            "/loginhwi/check-twitter"
                    linkedin:           "/loginhwi/check-linkedin"
                    flickr:             "/loginhwi/check-flickr"
                login_path:        fos_user_security_login
                check_path:        fos_user_security_check
                failure_path:      fos_user_security_login
                success_handler:  authentication_site_handler
                oauth_user_provider:
                    service: fosubuser.provider
    providers:
        main:
            id: fos_user.user_provider.username_email
    encoders:
        AppBundle\Entity\User\User: sha512
#Role hierarchy is now managed from the database
#    role_hierarchy:
#        ROLE_SUPER_ADMIN:       [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] #Allowed full access
    access_control:
        - { path: ^/admin, ip: 127.0.0.1, requires_channel: http, roles: ROLE_SUPER_ADMIN }
        - { path: ^/ , roles: IS_AUTHENTICATED_ANONYMOUSLY}

好的,錯誤來自

        http_basic: ~

在主防火牆中。 我不記得為什么我放了,但是刪除它解決了這個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM