[Twisted-web] How to disable directory listing

dreid at dreid.org dreid at dreid.org
Tue Aug 1 12:11:19 CDT 2006

> if the url points to a directory resource, then a list of the folder
> contents is displayed.
> How can this behaviour be disabled in web2?

Currently subclass static.File and override directoryListing (or
directoryLister, sorry i don't remember which)  You probably want it to
'raise http.HTTPError(responsecodes.FORBIDDEN)'


More information about the Twisted-web mailing list