Skip to content

Custom Content-Type #25

@trousyt

Description

@trousyt

Hi, I have a need to serve some non-standard files and currently the plugin uses the mime-types package, which doesn't correctly recognize my file extensions. Would you be opposed to accepting a PR for a change to be able to supply a custom Content-Type when a match is made?

It could look like this:

{
    pattern: /^\/metadata\.json/,
    resolve: "./metadata.json",
    contentType: "application/xml"
}

or possibly even:

{
    pattern: /^\/metadata\.json/,
    resolve: "./metadata.json",
    headers: {
        "Content-Type": "application/xml"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions