Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: good default for file_server.precompressed #6736

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

dunglas
Copy link
Collaborator

@dunglas dunglas commented Dec 7, 2024

Currently, the following snippet doesn't enable precompression:

file_server {
    precompressed
}

Supported formats must be passed explicitly.

This patch allows to omit the formats for simplicity. By default, Brotli, Zstandard, and gzip are enabled (in this order).
Brotli is preferred to Zstandard, because according to Paul Calvano's article, Brotli is better (smaller files) for static assets.

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a good idea. Thanks!

@mholt mholt merged commit 5c2617e into caddyserver:master Dec 10, 2024
33 checks passed
@mholt mholt added the feature ⚙️ New feature or request label Dec 10, 2024
@mholt mholt added this to the v2.9.0 milestone Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants