Mailing List Archive

access control
Hi,

for a common object on server, for example, http://a.com/b.jpg, when it can be accessed by client, I want to apply some access control on it, for example, the IP based AC rules. How will mod_perl handler deal with this? thanks.


   Regards,
  Ken Peng
Re: access control [ In reply to ]
With a PerlAccessHandler, see:

https://perl.apache.org/docs/2.0/user/handlers/http.html#PerlAccessHandler

Adam

On 17-10-19 06:48 AM, Ken Peng wrote:
> Hi,
>
> for a common object on server, for example, http://a.com/b.jpg, when it
> can be accessed by client, I want to apply some access control on it,
> for example, the IP based AC rules. How will mod_perl handler deal with
> this? thanks.
>
>
>    Regards,
>   Ken Peng
Re: access control [ In reply to ]
On 19.10.2017 12:48, Ken Peng wrote:
> Hi,
>
> for a common object on server, for example, http://a.com/b.jpg, when it can be accessed by
> client, I want to apply some access control on it, for example, the IP based AC rules. How
> will mod_perl handler deal with this? thanks.
>

If you do the authentication separately (e.g. via some other Apache authentication
module), then an existing mod_perl response
handler will not care, and nothing will change at the response level.
The only thing that will change is that, if the authentication is NOT sucessful, the HTTP
request will never even reach the mod_perl response handler, it will be rejected before
the handler is called.

If your question is related to using a mod_perl module to do the authentication, that is
quite different, and you will need to express your needs more precisely.

Maybe have a look here, to understand what happens when :

http://perl.apache.org/docs/2.0/user/handlers/http.html#HTTP_Request_Cycle_Phases