WsgiDAV is a WSGI application extended by a list of middleware components. The stack is defined via the middleware_stack key in the configuration.
Python Configuration
You can pass instantiated middleware objects or the middleware classes themselves. If you pass a class, WsgiDAV will instantiate it using a common signature. Built-in middleware includes WsgiDavDebugFilter, ErrorPrinter, HTTPAuthenticator, WsgiDavDirBrowser, and RequestResolver. Note: RequestResolver must be the last item in the stack.
YAML Configuration
In YAML, you can specify middleware using their class paths. For third-party middleware where the constructor signature is not standard, use class with args (positional) or kwargs (named) keys. Use the special placeholder ${application} to refer to the WsgiDAV application instance.
middleware_stack:
- class: dozer.Dozer
args:
- "${application}"
- class: dozer.Profiler
args:
- "${application}"
- null # global_conf
- /tmp # profile_path
- wsgidav.mw.debug_filter.WsgiDavDebugFilter
- wsgidav.error_printer.ErrorPrinter
- wsgidav.http_authenticator.HTTPAuthenticator
- wsgidav.dir_browser.WsgiDavDirBrowser
- wsgidav.request_resolver.RequestResolver