--- loncom/auth/lonacc.pm 2011/08/09 01:35:31 1.137 +++ loncom/auth/lonacc.pm 2012/05/30 20:29:49 1.138 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: lonacc.pm,v 1.137 2011/08/09 01:35:31 raeburn Exp $ +# $Id: lonacc.pm,v 1.138 2012/05/30 20:29:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -438,9 +438,17 @@ sub handler { # ------------------------------------------------------ Check if load balancer - ($is_balancer,$otherserver) = - &Apache::lonnet::check_loadbalancing($env{'user.name'}, - $env{'user.domain'}); + my $checkexempt; + if ($env{'user.loadbalexempt'} eq $r->dir_config('lonHostID')) { + if ($env{'user.loadbalcheck.time'} + 600 > time) { + $checkexempt = 1; + } + } + unless ($checkexempt) { + ($is_balancer,$otherserver) = + &Apache::lonnet::check_loadbalancing($env{'user.name'}, + $env{'user.domain'}); + } if ($is_balancer) { $r->set_handlers('PerlResponseHandler'=> [\&Apache::switchserver::handler]);