--- Redmine.pm.orig	2010-04-06 17:39:07.813256302 +0200
+++ Redmine.pm	2010-04-06 17:39:07.813256302 +0200
@@ -1,5 +1,5 @@
 package Apache::Authn::Redmine;
-
+ 
 =head1 Apache::Authn::Redmine
 
 Redmine - a mod_perl module to authenticate webdav subversion users
@@ -105,10 +105,11 @@
 
 use Apache2::Module;
 use Apache2::Access;
+use Apache2::Connection;
 use Apache2::ServerRec qw();
 use Apache2::RequestRec qw();
 use Apache2::RequestUtil qw();
-use Apache2::Const qw(:common :override :cmd_how);
+use Apache2::Const qw(:common :override :cmd_how :remotehost);
 use APR::Pool ();
 use APR::Table ();
 
@@ -197,6 +198,9 @@
 sub access_handler {
   my $r = shift;
 
+  if ($r->connection->remote_ip  eq $r->connection->local_ip)
+    { return OK; }
+
   unless ($r->some_auth_required) {
       $r->log_reason("No authentication has been configured");
       return FORBIDDEN;
@@ -216,6 +220,9 @@
 sub authen_handler {
   my $r = shift;
   
+  if ($r->connection->remote_ip  eq $r->connection->local_ip)
+    { return OK; }
+
   my ($res, $redmine_pass) =  $r->get_basic_auth_pw();
   return $res unless $res == OK;
   
