We're pleased to present the next previews of Caddy 2.9! While in beta, new features and changes may be unstable, so please test in suitable environments that may expose issues so we can fix them before the stable release.
While there are some features in this release (such as socket-activation-listeners), we've focused mainly on refinements and bug fixes in many areas, including:
- Config loading
- Events
- Logging
- Placeholders
- Reverse proxy and HTTP server performance
- Matchers
- HTTP (esp. HTTP/3)
- Metrics (per-host metrics)
We hope you will enjoy the 2.9 beta releases. Please try them out and report bugs! There is still more to come before the stable 2.9.0 release!
Thanks to all contributors, bug reporters, and helpers.
What's Changed
- Make it possible to configure the
DisableStorageCheck
setting for certmagic by @ankon in #6368 - caddyhttp: Add test case to corpus by @mholt in #6374
- cmd: remove zealous check of Caddyfile auto-detection by @mohammed90 in #6370
- ci: upgrade to goreleaser v2 by @mohammed90 in #6376
- logging: Allow setting log file permissions by @ririsoft in #6314
- Split
run
into a publicBuildContext
and a private part by @ankon in #6378 - Write the header if none had been written in WriteResponse by @ankon in #6380
- fix file mode configuration parsing by @ririsoft in #6383
- go.mod: update tscert package by @willnorris in #6384
- logging: Customizable
zapcore.Core
by @kkroo in #6381 - logging: set file mode when the file already exist. by @ririsoft in #6391
- caddyfile: Pass blocks to
import
for snippets by @elee1766 in #6130 - reverseproxy: add Max-Age option to sticky cookie by @JasonYuan869 in #6398
- fileserver: Remove newline characters from precomputed etags by @armadi1809 in #6394
- fix: http.intercept.header.* placeholders by @dunglas in #6429
- reverseproxy: Only log host is up status on change by @klaxa in #6419
- fix: don't compress already compressed fonts by @dunglas in #6432
- caddyhttp: Reject 0-RTT early data in IP matchers and set Early-Data header when proxying by @mholt in #6427
- reverseproxy: Add placeholder for host in active health check headers by @francislavoie in #6440
- browse: add Content-Security-Policy w/ nonce by @steffenbusch in #6425
- browse: fix Content-Security-Policy warnings in Firefox by @steffenbusch in #6443
- fileserver: Exclude symlink target size from total, show arrow on size by @francislavoie in #6412
- reverseproxy: Fix dynamic upstreams ip version by @armadi1809 in #6448
- reverseproxy: Add placeholder for networkAddr in active health check headers by @dylanschultzie in #6450
- Add option to set which HTTP method to use for active health checks by @jbro in #6453
- reverseproxy: Caddyfile support for health_method by @jbro in #6454
- reverseproxy: add health_upstream subdirective by @dylanschultzie in #6451
- ci: correct
-tags nobadger
on binary build by @girlbossceo in #6470 - Caddyfile support for TLS handshake matchers by @vnxme in #6461
- Caddyfile support for TLS connection and certificate selection policies by @vnxme in #6462
- chore: update golangci config by @mohammed90 in #6479
- encode: flush already compressed data to the stream by @WeidiDeng in #6471
- proxyprotocol: Update WrapListener to use ConnPolicyFunc for PROXY protocol by @pi-prakhar in #6485
- fileserver: add
sort
options by @lollipopkit in #6468 - go.mod: update quic-go package by @WeidiDeng in #6498
- Runtime placeholders for selected TLS and HTTP matchers by @vnxme in #6480
- replacer:
{file.*}
global placeholder strips trailing newline by @steffenbusch in #6411 - go.mod: update update golang/x/net by @WeidiDeng in #6500
- reverse_proxy: apply keep-alive setting for h2c requests by @WeidiDeng in #6343
- Fix a regression in #6480: the context may have no replacer by @vnxme in #6510
- caddyhttp: Export PrivateRangesCIDR() for plugins after #6480 by @vnxme in #6514
- ignore exec.ErrDot when starting caddy in background by @WeidiDeng in #6512
- ci: don't exit early on error in remote CI machine by @mohammed90 in #6519
- reverseproxy: Active health checks request body option by @jbro in #6520
- reverseproxy: Change logs for write errors to warn level by @jum in #6532
- cmd: Use a factory to create the caddy root command by @elee1766 in #6533
- chore: Fix a typo by @sunnyagain in #6534
- error: run
error
(msg) through replacer by @mohammed90 in #6536 - reverseproxy: allow user to define source address by @mohammed90 in #6504
- chore: build and test with Go 1.23 by @dunglas in #6526
- tls: use Go default kex for the moment that include PQC by @bwesterb in #6542
- ci: prepare syso files for windows embedding in release by @WeidiDeng in #6406
- Performance: Prevents the zap logger from serializing the request in rewrite.go. by @AlliBalliBaba in #6541
- fileserver: move
sort
tobrowse
by @lollipopkit in #6502 - reverse_proxy: add placeholder http.reverse_proxy.retries by @steffenbusch in #6553
- fix(#6551): Unexpected behaviour if caddyhttp.Route is provisioned twice by @jbro in #6558
- caddytls: Add sni_regexp matcher by @vnxme in #6569
- rewrite: Avoid panic on bad arg count for
uri
by @mister-turtle in #6571 - perf: use zap's Check() to prevent useless allocs by @dunglas in #6560
- ci: update the linter action version by @mohammed90 in #6575
- update quic-go to v0.47.0 by @marten-seemann in #6582
- quic: enable qlog, controlled by QLOGDIR env by @marten-seemann in #6581
- caddytls: Give a better error message when given encrypted private keys by @francislavoie in #6591
- chore: Use slices package where possible by @francislavoie in #6585
- caddyhttp: Optimize logs using zap's WithLazy() by @AlliBalliBaba in #6590
- doc: remove docs of deprecated directives by @mohammed90 in #6566
- Implement issue #6296 passing FDs / socket activation by @MayCXC in #6573
- caddyhttp: Fix listener wrapper regression from #6573 by @MayCXC in #6599
- chore: Adjust incorrect
reverse_proxy
Caddyfile comment by @francislavoie in #6598 - http: ReponseWriter prefer ReadFrom if available by @WeidiDeng in #6565
- caddytls: Support new tls.context module by @mholt in #6369
- Better errors when reloading by @mholt in #6601
- caddyhttp: Escaping placeholders in CEL, add
vars
andvars_regexp
by @francislavoie in #6594 - autohttps: Implement
auto_https prefer_wildcard
option by @francislavoie in #6146 - metrics: scope metrics to active config, add optional per-host metrics by @mohammed90 in #6531
- ci: install xcaddy to fix release flow by @mohammed90 in #6602
- caddytls: Drop
rate_limit
andburst
, has been deprecated by @francislavoie in #6611 - tests: Fix adapt test warning by @mohammed90 in #6619
- docs: expand proxy protocol docs by @mohammed90 in #6620
- caddyfile: Fix comma edgecase in address parsing by @francislavoie in #6616
- reverseproxy: Use correct cases for websocket related headers by @WeidiDeng in #6621
- chore: update quic-go to v0.48.0 by @marten-seemann in #6627
- caddyhttp: Close http3 server gracefully by @WeidiDeng in #6213
- metrics: move
metrics
up, outsideservers
by @mohammed90 in #6606 - fix: always ignore SIGPIPE by @dunglas in #6645
- fileserver: fix try_policy when instantiating file matcher from CEL by @effleurager in #6624
- chore: fix some function names in comment by @davidwoood in #6650
- core: addresses.go funcs renames by @MayCXC in #6622
- tracing: Add
spanID
field to access logs andhttp.vars.span_id
placeholder by @YifanYang6 in #6646 - reverseproxy: Sync changes from stdlib for 1xx handling by @francislavoie in #6656
- chore: Bump quic-go to 0.48.1, fixing a panic by @francislavoie in #6654
- chore: compile without nosql's support for Postgres and MySQL by @dunglas in #6655
- cmd: Allow
add-package
to select version of package by @Botelho31 in #6665 - httpcaddyfile: Fixes for
prefer_wildcard
mode by @francislavoie in #6636 - Use
WithLazy
to prevent eager serialization of the event data by @ankon in #6671 - forwardauth: Skip copying missing response headers by @francislavoie in #6608
- caddyhttp: Add
MatchWithError
to replace SetVar hack by @francislavoie in #6596 - go.mod: upgrade only some otel deps by @mohammed90 in #6676
- fileserver: Add
file_limit
option for browse by @atakanyenel in #6648 - rewrite: Don't add
/
in Caddyfile, do it after replacer by @francislavoie in #6662 - caddytls: Allow disabling storage cleaning, avoids writing two files by @francislavoie in #6593
New Contributors
- @ririsoft made their first contribution in #6314
- @JasonYuan869 made their first contribution in #6398
- @klaxa made their first contribution in #6419
- @dylanschultzie made their first contribution in #6450
- @jbro made their first contribution in #6453
- @girlbossceo made their first contribution in #6470
- @vnxme made their first contribution in #6461
- @pi-prakhar made their first contribution in #6485
- @lollipopkit made their first contribution in #6468
- @sunnyagain made their first contribution in #6534
- @AlliBalliBaba made their first contribution in #6541
- @mister-turtle made their first contribution in #6571
- @MayCXC made their first contribution in #6573
- @effleurager made their first contribution in #6624
- @davidwoood made their first contribution in #6650
- @YifanYang6 made their first contribution in #6646
- @Botelho31 made their first contribution in #6665
- @atakanyenel made their first contribution in #6648
Full Changelog: v2.8.4...v2.9.0-beta.3
Changelog
- ef4e022 caddyfile: Fix comma edgecase in address parsing (#6616)
- 09b2cbc caddyhttp: Add
MatchWithError
to replace SetVar hack (#6596) - c6f2979 caddyhttp: Close http3 server gracefully (#6213)
- 88fd5f3 caddyhttp: Use internal issuer for IPs when no APs configured
- 5c8dc34 caddytls: Allow disabling storage cleaning, avoids writing two files (#6593)
- d7564d6 caddytls: Drop
rate_limit
andburst
, has been deprecated (#6611) - d398898 cmd: Allow
add-package
to select version of package (#6665) - 0182fb8 core: addresses.go funcs renames (#6622)
- 1d15652 events: Use
WithLazy
to prevent eager serialization of the event data (#6671) - cc23ad6 fileserver: Add
file_limit
option for browse (to be experimental) (#6648) - 350ad38 fileserver: Fix Caddyfile parsing
- 9753c44 fileserver: fix try_policy when instantiating file matcher from CEL (#6624)
- 05cfb12 forwardauth: Skip copying missing response headers (#6608)
- da88ec1 go.mod: Update certmagic
- 00f948c go.mod: Update dependencies
- 2ae58ac go.mod: Upgrade some dependencies
- 91e3413 go.mod: upgrade only some otel deps (#6676)
- b129ed6 httpcaddyfile: Fixes for
prefer_wildcard
mode (#6636) - 388c7e8 metrics: move
metrics
up, outsideservers
(#6606) - 5e6024c reverseproxy: Fix log message
- fbf0f4c reverseproxy: Sync changes from stdlib for 1xx handling (#6656)
- 48ce47f reverseproxy: Use correct cases for websocket related headers (#6621)
- 5823ecc rewrite: Don't add / in Caddyfile, do it after replacer (#6662)
- b443190 sigtrap: always ignore SIGPIPE (#6645)
- 669fc41 tracing: Add
spanID
field to access logs andhttp.vars.span_id
placeholder (#6646)