Skip to content

Feature request: Pre-compressed static files #577

@mollymorphous

Description

@mollymorphous

Thanks so much for the static files feature; it simplifies deployment for my hobby project!

I think it would be nice to have support for pre-compressed static files in the static file server, like nginx's gzip_static directive.

When enabled, a request matching a static file with an appropriate Accept-Encoding header would also check for files matching the path with a .gz, .br, or .zst suffix and respond with the smallest matching compressed version and appropriate Content-Encoding and Vary headers.

Please let me know if you think this feature makes sense for Granian. I'm still new to Rust, but I'd be happy to make a PR if interested!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions