Skip to content

try_files for @std/http/file_server #5875

Open
@redabacha

Description

@redabacha

Is your feature request related to a problem? Please describe.

there is currently no built-in way to attempt to serve a file from a directory and then handle when the file doesn't exist.

Describe the solution you'd like

a function similar to serveDir or serveDir itself but will throw or hand off back in some way to the caller to deal with when a file is missing, similar to the try_files directive in nginx.

Describe alternatives you've considered

building my own solution but i feel this would be a common enough use case to have as part of the standard library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feedback welcomeWe want community's feedback on this issue or PRhttpsuggestiona suggestion yet to be agreed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions