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:
75
75
.. tip ::
76
76
77
77
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:
79
81
80
82
.. configuration-block ::
81
83
@@ -87,7 +89,7 @@ as the value to the current URL:
87
89
firewalls :
88
90
main :
89
91
# ...
90
- switch_user : { parameter: HTTP_X_SWITCH_USER }
92
+ switch_user : { parameter: X-Switch-User }
91
93
92
94
.. code-block :: xml
93
95
@@ -104,7 +106,7 @@ as the value to the current URL:
104
106
<!-- ... -->
105
107
<firewall name =" main" >
106
108
<!-- ... -->
107
- <switch-user parameter =" HTTP_X_SWITCH_USER " />
109
+ <switch-user parameter =" X-Switch-User " />
108
110
</firewall >
109
111
</config >
110
112
</srv : container >
@@ -118,7 +120,7 @@ as the value to the current URL:
118
120
$security->firewall('main')
119
121
// ...
120
122
->switchUser()
121
- ->parameter('HTTP_X_SWITCH_USER ')
123
+ ->parameter('X-Switch-User ')
122
124
;
123
125
};
124
126
You can’t perform that action at this time.
0 commit comments