File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ as the value to the current URL:
7575 .. tip ::
7676
7777 Instead of adding a ``_switch_user `` query string parameter, you can pass
78- the username in a ``HTTP_X_SWITCH_USER `` header. You can use this feature by adjusting the ``parameter `` setting:
78+ the username in a custom HTTP header by adjusting the ``parameter `` setting.
79+ For example, to use ``X-Switch-User `` header (available in PHP as
80+ ``HTTP_X_SWITCH_USER ``) add this configuration:
7981
8082 .. configuration-block ::
8183
@@ -87,7 +89,7 @@ as the value to the current URL:
8789 firewalls :
8890 main :
8991 # ...
90- switch_user : { parameter: HTTP_X_SWITCH_USER }
92+ switch_user : { parameter: X-Switch-User }
9193
9294 .. code-block :: xml
9395
@@ -104,7 +106,7 @@ as the value to the current URL:
104106 <!-- ... -->
105107 <firewall name =" main" >
106108 <!-- ... -->
107- <switch-user parameter =" HTTP_X_SWITCH_USER " />
109+ <switch-user parameter =" X-Switch-User " />
108110 </firewall >
109111 </config >
110112 </srv : container >
@@ -118,7 +120,7 @@ as the value to the current URL:
118120 $security->firewall('main')
119121 // ...
120122 ->switchUser()
121- ->parameter('HTTP_X_SWITCH_USER ')
123+ ->parameter('X-Switch-User ')
122124 ;
123125 };
124126
You can’t perform that action at this time.
0 commit comments