My first thought was to write a PerlAccessHandler that can check the IP and other reqs. If the reqs are met, set the custom_response to the pop-up (html or cgi) and return FORBIDDEN.
Here's where the problem is. If the reqs are met and I return FORBIDDEN, rather that the custom_response html being displayed, I'm presented with a browser username/password pop-up. Any ideas on how to get around that? Here's a real boiled down snippet that displays the behaviour I'm talking about:
and here's the conf:package Foo::BAR::Access; use Apache::Constants qw( :methods :response ); use strict; sub handler { my $r = shift; my $ip = $r->connection->remote_ip; if( $ip =~ /^10.10.1.*$/ ) { $r->custom_response( FORBIDDEN, "/survey.html" ); return FORBIDDEN; } return OK; }
<Location /cgi-bin/foo.cgi> PerlAccessHandler Foo::BAR::Access PerlHandler Apache::PerlRun Options ExecCGI PerlSendHeader On </Location>
(there's a lot of logging in the real code so I'm sure it's not the pass through that is causing me problems - yet).
-derby.
In reply to mod_perl and PerlAccessHandler by derby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |