You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2008/11/04 23:16:43 UTC

Re: Howto ip-protect a specific url in webapp?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

Caldarale, Charles R wrote:
>> From: Harri.Paivaniemi@tietoenator.com
>> [mailto:Harri.Paivaniemi@tietoenator.com]
>> Subject: Howto ip-protect a specific url in webapp?
>>
>> I can restrict the whole /foo by using valve in
>> "/etc/tomcat5/Catalina/localhost/foo.xml" but howto protect
>> only /foo/admin?
> 
> Either put the check in the servlet that handles /foo/admin, or write your own valve that extends the existing RemoteAddrValve.

You could also use a filter. URLrewrite will do this for you if you
don't feel like writing one yourself (http://tuckey.org/urlrewrite/).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkQycsACgkQ9CaO5/Lv0PDUBgCcCRMOvtPpdTVO7L+3LglnlnDc
rRkAmwWcPLj0QTV7w9I2JekTXPoQWQYa
=DPbQ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org