diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 3d84a75..c919848 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -45,7 +45,7 @@ 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: ^/api/v1/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/api/v1/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/api/, roles: ROLE_USER } - { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: /login, roles: IS_AUTHENTICATED_ANONYMOUSLY } diff --git a/config/routes.yaml b/config/routes.yaml index 20ddb7f..774bbff 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -31,7 +31,7 @@ user_logout: path: /logout # API -api_login: +api_v1_login: path: /api/v1/login controller: App\Api\V1\Controller\SecurityController::login defaults: