File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,9 @@ class CleantalkRequest {
295295 * @var int
296296 */
297297 public $ submit_time = null ;
298+
299+ public $ x_forwarded_for = '' ;
300+ public $ x_real_ip = '' ;
298301
299302 /**
300303 * Is enable Java Script,
@@ -715,11 +718,15 @@ private function httpRequest($msg) {
715718 if (method_exists ($ request ,'server ' ))
716719 {
717720 $ si ['remote_addr ' ]=$ request ->server ('REMOTE_ADDR ' );
721+ $ msg ->x_forwarded_for =$ request ->server ('X_FORWARDED_FOR ' );
722+ $ msg ->x_real_ip =$ request ->server ('X_REAL_IP ' );
718723 }
719724 }
720725 else
721726 {
722727 $ si ['remote_addr ' ]=$ _SERVER ['REMOTE_ADDR ' ];
728+ $ msg ->x_forwarded_for =@$ _SERVER ['X_FORWARDED_FOR ' ];
729+ $ msg ->x_real_ip =@$ _SERVER ['X_REAL_IP ' ];
723730 }
724731 $ msg ->sender_info =json_encode ($ si );
725732 if (((isset ($ this ->work_url ) && $ this ->work_url !== '' ) && ($ this ->server_changed + $ this ->server_ttl > time ()))
You can’t perform that action at this time.
0 commit comments