Response Compression in Traefik
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
What problem will this feature address?
I noticed that most HTTP responses are uncompressed.
Describe the solution you'd like
Traefik supports the Compress middleware. It would be great if response compression can be enabled server-wide (like how Cloudflare's automatically compresses HTTP responses if the upstream doesn't do it).
Describe alternatives you've considered
Currently I am using manually editing Traefik config.
First I have to create a dynamic config file:
# /etc/dokploy/traefik/dynamic/compress.yml
http:
middlewares:
compress:
compress:
encodings: [br, zstd, gzip]
Then I have to edit the main config file to use this middleware globally:
# /etc/dokploy/traefik/traefik.yml (excerpt)
entryPoints:
web:
address: :80
http: # 👈 NEW
middlewares:
- compress@file
websecure:
address: :443
http3:
advertisedPort: 443
http:
tls:
certResolver: letsencrypt
middlewares: # 👈 NEW
- compress@file
After reloading, responses are now compressed.
Additional context
No response
Will you send a PR to implement it?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Dokploy generates /etc/dokploy/traefik/dynamic/compress.yml and /etc/dokploy/traefik/traefik.yml. Confirm how entry points and middleware configuration are exposed, then verify that newly generated Traefik configuration compresses eligible HTTP responses without manual edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100