Skip to content

suggestion(http): change ServeDirOptions.headers to accept HeadersInit instead of string[] #6723

Open
@iuioiua

Description

@iuioiua

It surprised me when I discovered serveDir() accepted string[] instead of HeadersInit as an option. It makes the user write needlessly write a raw header. I suggest we change this in @std/http/unstable-file-server without changing the CLI behaviour.

API reference: https://jsr.io/@std/http/doc/~/ServeDirOptions.headers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions