@@ -1686,7 +1686,7 @@ Next, you need to create a route for this URL (but not a controller):
16861686 class SecurityController extends AbstractController
16871687 {
16881688 /**
1689- * @Route("/logout", name="app_logout", methods={"GET "})
1689+ * @Route("/logout", name="app_logout", methods={"POST "})
16901690 */
16911691 public function logout(): void
16921692 {
@@ -1705,7 +1705,7 @@ Next, you need to create a route for this URL (but not a controller):
17051705
17061706 class SecurityController extends AbstractController
17071707 {
1708- #[Route('/logout', name: 'app_logout', methods: ['GET '])]
1708+ #[Route('/logout', name: 'app_logout', methods: ['POST '])]
17091709 public function logout()
17101710 {
17111711 // 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):
17181718 # config/routes.yaml
17191719 app_logout :
17201720 path : /logout
1721- methods : GET
1721+ methods : POST
17221722
17231723 .. code-block :: xml
17241724
@@ -1729,7 +1729,7 @@ Next, you need to create a route for this URL (but not a controller):
17291729 xsi : schemaLocation =" http://symfony.com/schema/routing
17301730 https://symfony.com/schema/routing/routing-1.0.xsd" >
17311731
1732- <route id =" app_logout" path =" /logout" methods =" GET " />
1732+ <route id =" app_logout" path =" /logout" methods =" POST " />
17331733 </routes >
17341734
17351735 .. code-block :: php
@@ -1739,7 +1739,7 @@ Next, you need to create a route for this URL (but not a controller):
17391739
17401740 return function (RoutingConfigurator $routes) {
17411741 $routes->add('app_logout', '/logout')
1742- ->methods(['GET '])
1742+ ->methods(['POST '])
17431743 ;
17441744 };
17451745
0 commit comments