Skip to content

How to add custom headers when using app.mount (Specifically, cache-control headers) #1433

@pushshift

Description

@pushshift

I am using app.mount similar to the following example:

app.mount("/app", StaticFiles(directory="html", html="index.html"), name="static")

How would I go about adding custom response headers when mounting static files in this fashion? Specifically, I would like to add cache-control response headers for this mount.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions