Skip to content

Add .headers support #360

@BigBlueHat

Description

@BigBlueHat

The .headers file idea comes from the File Handler in wptserve (a Python-based server for running the Web Platform Tests system at the W3C).

They look like this:

Content-Type: text/html

In wptserve they can be associated with single files (index.html.headers or index.headers) as well as directories (for /about/ style requests) via a __dir__.headers file (because Python-esque).

The advantage is that you can then provide any number of HTTP headers for any file or "directory" or perhaps even non-resource requests such as handling HEAD-only requests or 303 See Also specific entities.

This could be used to address a number of issues related mentioned here related to caching and content-types as well as things like advanced CORS and CSP handling.

Thoughts welcome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions