You can do this:

    @Contribute(ClientWhitelist.class)
    public static void
overrideWhiteList(OrderedConfiguration<WhitelistAnalyzer>
configuration, @Symbol(SymbolConstants.PRODUCTION_MODE) boolean
productionMode)
    {
        if (productionMode) { configuration.override("LocalhostOnly", null); }
    }


This is kind of neat, and an example of why configuring in code is
better than XML ... here, only in production mode we override the
built-in "LocalhostOnly" contribution to null, effectively removing
it.

On Thu, Dec 8, 2011 at 3:42 PM, Martin Strand
<do.not.eat.yellow.s...@gmail.com> wrote:
> If I'm not mistaken there is no way to remove a contribution.
> So if a proxy or load balancer were to mess up Request.getRemoteAddr(), you
> would have to decorate ClientWhitelist to remove the localhost whitelisting,
> right?
>
>
> On Thu, 08 Dec 2011 16:29:43 +0100, Howard Lewis Ship <hls...@gmail.com>
> wrote:
>
>> Try accessing PageCatalog from beyond your localhost  ... localhost is
>> "white listed", other IP addresses are not on the white list unless
>> you make a specific contribution.
>>
>> See:
>>
>>
>>  http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/WhitelistAccessOnly.html
>>
>>  http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/security/ClientWhitelist.html
>>
>> On Thu, Dec 8, 2011 at 1:24 AM, angelochen <angelochen...@yahoo.com.hk>
>> wrote:
>>>
>>> hi,
>>> setting production mode to true in 5.3, servicestatus not show details,
>>> but
>>> pagecatalog still shows everything.
>>> what's the easy way to turn this off? Thanks,
>>> angelo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to