Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r18133: LJM-1684: User's IP in HTTP SUP::RPC req...

Committer: gariev
LJM-1684: User's IP in HTTP SUP::RPC requests

U   trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2011-01-27 12:18:10 UTC (rev 18132)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2011-01-27 12:21:15 UTC (rev 18133)
@@ -127,6 +127,9 @@
                     push @hosts, $_;
                     push @req_hosts, $_;
                 }
+
+                LJ::run_hook('modify_forward_list', \@hosts, \@req_hosts);
+
                 if (@hosts) {
                     my $real = shift @hosts;
                     LJ::Request->remote_ip($real);
@@ -134,14 +137,6 @@
                 LJ::Request->header_in('X-Forwarded-For', join(", ", @hosts));
             }
             
-            ## Moscow dev server through nginx proxy
-            if ($LJ::IS_DEV_SERVER) {
-                if (my $real_ip = LJ::Request->header_in('X-Real-IP')) {
-                    push @req_hosts, $real_ip;
-                    LJ::Request->remote_ip($real_ip);
-                }
-            }
-
             # and now, deal with getting the right Host header
             if ($_ = LJ::Request->header_in('X-Host')) {
                 LJ::Request->header_in('Host', $_);

Tags: gariev, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments