Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc2b9ce2

Browse files
committed
Merge remote-tracking branch 'origin/2.1' into 2.1
2 parentsa2dabe8 +46ce5a4 commitc2b9ce2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎cookbook/security/target_path.rst‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ How to change the Default Target Path Behavior
55
==============================================
66

77
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.
1112

1213
On some occasions, this is unexpected. For example when the last request
1314
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``::
6162
return;
6263
}
6364

64-
$request->getSession()->set('_security.target_path', $request->getUri());
65+
$request->getSession()->set('_security.main.target_path', $request->getUri());
6566
}
6667
}
6768

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp