I am working on a REST API using Symfony 2.1.
My code works fine, but there is a problem that I can log in to /api/ , but this login can only work under /api/* . But I need to have access to the whole page.
api: pattern: ^/api #anonymous: ~ form_login: false provider: fos_userbundle http_basic: realm: "REST Service" main: pattern: .* provider: fos_userbundle form_login: check_path: fos_user_security_check login_path: fos_user_security_login default_target_path: wi_homepage logout: path: fos_user_security_logout target: wi_homepage anonymous: true switch_user: true remember_me: key: "%secret%" name: RememberMe lifetime: 2592000 remember_me_parameter: _remember_me
So, is there a way to do http-entry in the /api/ directory and have access anywhere?
source share