File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,10 @@ How to change the Default Target Path Behavior
5
5
==============================================
6
6
7
7
By default, the security component retains the information of the last request
8
- URI in a session variable named ``_security.target_path ``. Upon a successful
9
- login, the user is redirected to this path, as to help her continue from
10
- the last known page she visited.
8
+ URI in a session variable named ``_security.main.target_path `` (with ``main `` being
9
+ the name of the firewall area, defined in the ``security.yml ``). Upon a successful
10
+ login, the user is redirected to this path, as to help her continue from the last
11
+ known page she visited.
11
12
12
13
On some occasions, this is unexpected. For example when the last request
13
14
URI was an HTTP POST against a route which is configured to allow only a POST
@@ -61,7 +62,7 @@ Next, create your own ``ExceptionListener``::
61
62
return;
62
63
}
63
64
64
- $request->getSession()->set('_security.target_path', $request->getUri());
65
+ $request->getSession()->set('_security.main. target_path', $request->getUri());
65
66
}
66
67
}
67
68
You can’t perform that action at this time.
0 commit comments