[Seaside] How to reverse unregister handler?

Lukas Renggli renggli at gmail.com
Sun Oct 23 09:35:54 UTC 2011


Ideally you do not load the examples and the development tools into
your production images. This is the easiest way to be certain that non
of the examples and development tools won't be executed.

That said, for most of my deployments I don't build a separate image.
It is just too convenient to have all tools at hand. Instead I proxy
with apache to one secured entry point (this is described in the
Seaside book how to do it). Like this the outside word can only see  a
properly locked down version, and internally I have access to all
tools.

Lukas

On 22 October 2011 14:11, Bob Arning <arning at charm.net> wrote:
> I take a slightly different approach - remove everything and add back
> whatever I want to keep:
>
> WAAdmin clearAll.
> WAEnvironment registerDefaultRequestHandlers.
> MyComponent initialize.    "repeat as needed"
> WAAdmin defaultDispatcher defaultName: 'myComponentsName'.
>
> And then, if I want to enable everything again:
>
> WAEnvironment reloadApplications
>
> Cheers,
> BOb
>
> On 10/22/11 7:47 AM, Marco A. Gonzalez wrote:
>
> To prepare my image for deployment, I created a "Developer-Only" page on
> which I have an anchor whose callback executes the following:
>
> unregisterAllHandlers
> 	(self confirm: 'Are you sure you want to unregister all handlers. This
> should only be done on an image that will be deployed. This action is
> irreversible for this image.')
> 		ifTrue: [
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'examples').
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'comet').
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'tests').
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'tools').
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'welcome').
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'config').
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'status').
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'javascript').
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'files').
> 			WADispatcher default unregister: (WADispatcher default handlerAt:
> 'browse').	
> 		].
>
> Is there a way to get those handlers back? If so, how is it done?
> Is the above a reasonable way to "protect the image" in deployment?
>
> - Marco A.
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



-- 
Lukas Renggli
www.lukas-renggli.ch


More information about the seaside mailing list