v2.6.3

caddyserver/caddyv2.6.3Feb 8, 2023by github-actions[bot]

AI Summary

This release introduces global trusted proxy configuration, Windows support for Unix sockets, and improved WebSocket logging.

Key Highlights

  • New global `trusted_proxies` option for specifying trusted proxy IP ranges.
  • Unix sockets are now supported as proxy upstreams on Windows.
  • Proxied WebSocket connections are now logged with correct status codes and byte counts.
  • HTTP/3 optimizations via the quic-go package.

New Features

  • Configurable default lifetime for issued certificates.
  • Added `CADDY_ADMIN` environment variable support.
  • Added `dns_ttl` configuration option.
  • Added `--envfile` flag for the `validate` command.
  • Glob pattern support for the file matcher and `try_files`.
  • Named matchers in Caddyfile can use CEL expressions without specifying `expression`.

Full Release Notes

This release brings a number of bug fixes and minor features. We recommend that all users check the release notes/commits, then test and upgrade.

Notable changes:

- New `trusted_proxies` global option (within `servers`) can be used to specify trusted proxy IP ranges globally. This is important if relying on headers for client IP addresses.
- Unix sockets on Windows now supported as proxy upstreams.
- Proxied WebSocket connections are now logged with correct status code and "size" (bytes read + bytes written).
- The [quic-go](https://github.com/quic-go/quic-go) package has received significant optimizations, so HTTP/3 should be more efficient now.

Thank you to everyone who contributed to this release!

## Changelog
* bfaf2a82 acme_server: Configurable default lifetime for issued certificates (#5232)
* ac83b7e2 admin: Add `CADDY_ADMIN` env var to override the default (#5332)
* ac96455a admin: fix certificate renewal for admin (#5169)
* 762b0278 admin: set certmagic cache logger (#5173)
* 329af5ce build(deps): bump actions/cache from 2 to 3 (#5263)
* 3b724a20 build(deps): bump actions/upload-artifact from 1 to 3 (#5262)
* af93517c build(deps): bump goreleaser/goreleaser-action from 2 to 4 (#5264)
* cd49847e build(deps): bump peter-evans/repository-dispatch from 1 to 2 (#5261)
* 8d3a1b8b caddyauth: Use singleflight for basic auth (#5344)
* bbe36631 caddyconfig: Fix httploader leak from unused responses (#5159)
* 7f2a93e6 caddyfile: Allow overriding server names (#5323)
* 223cbe3d caddyhttp: Add server-level `trusted_proxies` config (#5103)
* 087f126c caddyhttp: Canonicalize header field names (#5176)
* 12bcbe2c caddyhttp: Pluggable trusted proxy IP range sources (#5328)
* ed503118 caddyhttp: add placeholder {http.request.orig_uri.path.*} (#5161)
* 33fdea8f caddypki: Prefer user-configured root instead of generating new one (#5189)
* 6f8fe01d caddypki: Use go.step.sm/crypto to generate the PKI (#5217)
* 1fa4cb7b caddytest: Increased sleep between retries to reduce flakey tests in CI (#5160)
* fef9cb3e caddytest: internalize init config into '.go' file (#5230)
* 55035d32 caddytls: Add `dns_ttl` config, improve Caddyfile `tls` options (#5287)
* 66ce0c5c caddytls: Add test cases for Caddyfile `tls` options (#5293)
* 0a3efd16 caddytls: Debug log for ask endpoint
* 94b8d560 cmd: Add `--envfile` flag to `validate` command (#5350)
* a999b707 cmd: Add missing `\n` to HelpTemplate (#5151)
* c3b5b181 cmd: Avoid panic when printing version without build info (#5210)
* 5805b3ca cmd: `caddy fmt` return code is 1 if not formatted (#5297)
* 8c0b49bf cmd: `fmt` exit successfully after overwriting config file (#5351)
* f20a8e7a cmd: replace deprecate func use (#5170)
* 536c28d4 core: Support Windows absolute paths for UDS proxy upstreams (#5114)
* dac7cacd encode: Respect Cache-Control no-transform (#5257)
* 4e9ad50f fileserver: Add a couple test cases
* 4bf6cb41 fileserver: Reject ADS and short name paths; trim trailing dots and spaces on Windows (#5148)
* a3ae146c fileserver: Reject non-GET/HEAD requests (close #5166) (#5167)
* e8ad9b32 go.mod: Update golang.org/x/net to v0.5.0 (#5314)
* fac35db9 go.mod: Update quic-go to v0.31.0
* 798c4a3b go.mod: Upgrade some dependencies
* 90798f3e go.mod: Upgrade various dependencies (#5362)
* 98867ac3 go.mod: bump tscert package to fix Tailscale 1.34+ on Windows (#5331)
* d73660f7 httpcaddyfile: Add persist_config global option (#5339)
* c38a040e httpcaddyfile: Fix `handle` grouping inside `route` (#5315)
* d6d75116 httpcaddyfile: Warn on importing empty file; skip dotfiles (#5320)
* 817470dd httploader: Close resp body on bad status code
* 72e7edda map: Clarified how destination values should be formatted (#5156)
* e9d95ab2 reverseproxy: Add flag to short command to disable redirects (#5330)
* e450a737 reverseproxy: Don't enable auto-https when `--from` flag is http (#5269)
* 845bc4d5 reverseproxy: Fix hanging for Transfer-Encoding: chunked (#5289)
* d4a7d89f reverseproxy: Improve hostByHashing distribution (#5229)
* c77a6bea reverseproxy: Log status code and byte count for websockets (#5140)
* ee7c92ec reverseproxy: Mask the WS close message when we're the client (#5199)
* d74f6fd9 reverseproxy: Set origreq in active health check (#5284)
* 96231020 tracing: Support placeholders in span name (#5329)