package ApachePerl::DeAuth; use strict; use warnings; use Apache2::Const -compile => qw(OK DECLINED); use Apache2::Log (); use Apache2::ServerUtil (); use Apache2::Access (); use Apache2::RequestRec qw(:all); use Apache2::RequestUtil; use Apache2::Reload; use APR::Table; sub handler { my $r=shift; my $s=$r->server; my $uri=$r->uri; my $regex= $r->dir_config("DeAuthUris"); if ($uri =~ $regex) { delete $r->headers_in->{"Authorization"}; $s->log_error("DeAuth.pm : Deleted Unnecessary Authorization field for Unprotected Location $uri"); } return Apache2::Const::OK; } 1; __END__