How to disable directory listing

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? Alex.

Alex Greif <alex.greif <at> gmail.com> writes:
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?
up to now I've been using this: class FileNoDir(static.File): def directoryListing(self): return None Kind regards, DQ

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)' -David
participants (3)
-
Alex Greif
-
dq
-
dreid@dreid.org