File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ private function buildRequest(Request $smartyRequest)
83
83
if ($ smartyRequest ->getReferer () != null )
84
84
curl_setopt ($ ch , CURLOPT_REFERER , $ smartyRequest ->getReferer ());
85
85
if ($ this ->ip != null ) {
86
- curl_setopt ($ ch , CURLOPT_HTTPHEADER , array ("X_FORWARDED_FOR : $ this ->ip " ));
87
- $ smartyRequest ->setHeader ('X_FORWARDED_FOR ' , $ this ->ip );
86
+ curl_setopt ($ ch , CURLOPT_HTTPHEADER , array ("X-Forwarded-For : $ this ->ip " ));
87
+ $ smartyRequest ->setHeader ('X-Forwarded-For ' , $ this ->ip );
88
88
}
89
89
90
90
return $ ch ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public function testNativeSetOnQuery() {
23
23
24
24
$ sender ->send ($ request );
25
25
26
- $ this ->assertEquals ("0.0.0.0 " , $ request ->getHeaders ()["X_FORWARDED_FOR " ]);
26
+ $ this ->assertEquals ("0.0.0.0 " , $ request ->getHeaders ()["X-Forwarded-For " ]);
27
27
}
28
28
29
29
public function testNativeNotSet () {
@@ -34,6 +34,6 @@ public function testNativeNotSet() {
34
34
$ sender ->send ($ request );
35
35
$ headers = $ request ->getHeaders ();
36
36
37
- $ this ->assertEquals (false , array_key_exists ("X_FORWARDED_FOR " , $ headers ));
37
+ $ this ->assertEquals (false , array_key_exists ("X-Forwarded-For " , $ headers ));
38
38
}
39
39
}
You can’t perform that action at this time.
0 commit comments