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

[livejournal] r19955: LJSUP-9704: [internal] Make alpha/beta/o...

Committer: gariev
LJSUP-9704: [internal] Make alpha/beta/omega servers send static files (http://stat.livejournal.com)
U   trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2011-09-05 06:10:05 UTC (rev 19954)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2011-09-05 06:55:57 UTC (rev 19955)
@@ -319,6 +319,14 @@
 
     $host = $LJ::DOMAIN_WEB unless LJ::Request::request->{r}->is_initial_req;
 
+    ## This is a hack for alpha/beta/omega servers to make them 
+    ## send static files (e.g. http://stat.livejournal.com/lanzelot/img/menu/div.gif?v=1)
+    ## Production static files are served by CDN (http://l-stat.livejournal.com)
+    if ($host eq 'stat.livejournal.com' && $uri !~ m!^/(stc|img|js)!) {
+         $uri = "/stc$uri";
+         LJ::Request->uri($uri);
+    }
+
     # disable TRACE (so scripts on non-LJ domains can't invoke
     # a trace to get the LJ cookies in the echo)
     if (LJ::Request->method_number == LJ::Request::M_TRACE) {

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