@@ -1686,7 +1686,7 @@ Next, you need to create a route for this URL (but not a controller):
1686
1686
class SecurityController extends AbstractController
1687
1687
{
1688
1688
/**
1689
- * @Route("/logout", name="app_logout", methods={"GET "})
1689
+ * @Route("/logout", name="app_logout", methods={"POST "})
1690
1690
*/
1691
1691
public function logout(): void
1692
1692
{
@@ -1705,7 +1705,7 @@ Next, you need to create a route for this URL (but not a controller):
1705
1705
1706
1706
class SecurityController extends AbstractController
1707
1707
{
1708
- #[Route('/logout', name: 'app_logout', methods: ['GET '])]
1708
+ #[Route('/logout', name: 'app_logout', methods: ['POST '])]
1709
1709
public function logout()
1710
1710
{
1711
1711
// controller can be blank: it will never be called!
@@ -1718,7 +1718,7 @@ Next, you need to create a route for this URL (but not a controller):
1718
1718
# config/routes.yaml
1719
1719
app_logout :
1720
1720
path : /logout
1721
- methods : GET
1721
+ methods : POST
1722
1722
1723
1723
.. code-block :: xml
1724
1724
@@ -1729,7 +1729,7 @@ Next, you need to create a route for this URL (but not a controller):
1729
1729
xsi : schemaLocation =" http://symfony.com/schema/routing
1730
1730
https://symfony.com/schema/routing/routing-1.0.xsd" >
1731
1731
1732
- <route id =" app_logout" path =" /logout" methods =" GET " />
1732
+ <route id =" app_logout" path =" /logout" methods =" POST " />
1733
1733
</routes >
1734
1734
1735
1735
.. code-block :: php
@@ -1739,7 +1739,7 @@ Next, you need to create a route for this URL (but not a controller):
1739
1739
1740
1740
return function (RoutingConfigurator $routes) {
1741
1741
$routes->add('app_logout', '/logout')
1742
- ->methods(['GET '])
1742
+ ->methods(['POST '])
1743
1743
;
1744
1744
};
1745
1745
0 commit comments