Committer: vad
LJSUP-11897: System to organize JS/CSS sources into a librariesU trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm =================================================================== --- trunk/cgi-bin/Apache/LiveJournal.pm 2012-04-20 14:08:36 UTC (rev 21774) +++ trunk/cgi-bin/Apache/LiveJournal.pm 2012-04-20 16:19:45 UTC (rev 21775) @@ -347,14 +347,6 @@ LJ::Request->uri($uri); } - ## allow cross domain ajax for (l-).stat domain - if ($host eq "stat.$LJ::DOMAIN"){ - LJ::Request->header_out('Access-Control-Allow-Origin' => '*'); - ## The Access-Control-Allow-Methods header indicates, as part of the response to a preflight request, - ## only GET is allowed. - LJ::Request->header_out('Access-Control-Allow-Methods' => 'GET'); - } - # 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) { @@ -388,6 +380,14 @@ LJ::Request->pnotes( 'original_uri' => LJ::Request->uri ); + # js/css file concatenation + if ($host eq "stat.$LJ::DOMAIN"){ + Apache::LiveJournal::ConcatHeadFiles->load; + LJ::Request->handler("perl-script"); + LJ::Request->set_handlers(PerlHandler => \&Apache::LiveJournal::ConcatHeadFiles::handler); + return LJ::Request::OK; + } + ## ## Process old/non-cacnonical URL and renamed accounts. if ($host !~ /^www\./){ @@ -1266,15 +1266,6 @@ return $view if defined $view; } - # header file concatenation - my $unParsedURI= LJ::Request->r->unparsed_uri(); - if ($unParsedURI =~ /\?\?/) { - Apache::LiveJournal::ConcatHeadFiles->load; - LJ::Request->handler("perl-script"); - LJ::Request->set_handlers(PerlHandler => \&Apache::LiveJournal::ConcatHeadFiles::handler); - return LJ::Request::OK; - } - # custom interface handler if ($uri =~ m!^/interface/([\w\-]+)$!) { my $inthandle = LJ::run_hook("interface_handler", {