Skip to content

Clarify serveDirectory indexing #657

Closed
@Crote

Description

@Crote

Servant.Utils.StaticFiles.serveDirectory currently uses WAI's defaultFileServerSettings, which mean that a directory index is automatically served when no index.html exists. This behaviour may be undesirable for many users and is not documented form serveDirectory.

As most applications using servant's serveDirectory will be webapps, the behaviour of defaultWebAppSettings would seem more appropriate: no directory indices and aggressive caching.

I'd like to suggest adding a second method which uses defaultWebAppSettings and clearly documenting which behaviour one should expect from each.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions