No activity today, make something!
tiddlyweb server_response_filters

20160313160653 cdent  

A config setting defining a list of WSGI applications which, in order, process the outgoing response from the server. This can transform, log, or handle exceptions as necessary.

Plugins can add additional response middleware by adding to this config setting. Functionality may also be removed (e.g. some systems will have no need for SimpleLog). Note that the values of the list are references to the middleware classes, not strings.

    'server_response_filters': [
        PermissionsExceptor,   # handle policy violations
        HTTPExceptor,          # turn HTTP exceptions into valid responses
        EncodeUTF8,            # encode unicode strings in UTF8
        TransformProtect,      # prevent proxies from transforming content
        SimpleLog],            # write a simple request log