File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ public function setServer(string $key, string $value): static
166166
167167 /**
168168 * Set trusted ip headers
169- *
169+ *
170170 * WARNING: Only set these headers if your application is behind a trusted proxy.
171171 * Trusting these headers when accepting direct client connections is a security risk.
172172 *
@@ -175,10 +175,10 @@ public function setServer(string $key, string $value): static
175175 */
176176 public function setTrustedIpHeaders (array $ headers ): static
177177 {
178- $ this -> trustedIpHeaders = array_filter (
179- array_map ('trim ' ,
180- array_map ( ' strtolower ' , $ headers ))
181- );
178+ $ normalized = array_map ( ' strtolower ' , $ headers );
179+ $ trimmed = array_map ('trim ' , $ normalized );
180+ $ this -> trustedIpHeaders = array_filter ( $ trimmed );
181+
182182 return $ this ;
183183 }
184184
You can’t perform that action at this time.
0 commit comments