summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-17go.mod: Upgrade CertMagic and quic-goMatthew Holt
2023-08-17reverseproxy: Always return new upstreams (fix #5736) (#5752)Matt Holt
* reverseproxy: Always return new upstreams (fix #5736) * Fix healthcheck logger race
2023-08-14ci: use gci linter (#5708)Jacob Gadikian
* use gofmput to format code * use gci to format imports * reconfigure gci * linter autofixes * rearrange imports a little * export GOOS=windows golangci-lint run ./... --fix
2023-08-11fileserver: Slightly more fitting iconsMatthew Holt
2023-08-09cmd: Require config for caddy validate (fix #5612) (#5614)pistasjis
* Require config for caddy validate - fixes #5612 Signed-off-by: Pistasj <hi@pistasjis.net> * Try making adjacent Caddyfile check its own function Signed-off-by: Pistasj <hi@pistasjis.net> * add Francis' suggestion Co-authored-by: Francis Lavoie <lavofr@gmail.com> * Refactor * Fix borked commit, sigh --------- Signed-off-by: Pistasj <hi@pistasjis.net> Co-authored-by: Francis Lavoie <lavofr@gmail.com> Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2023-08-09Fix testsMatthew Holt
I thought Go ordered JSON objects when marshaling, but I guess not.
2023-08-09caddytls: Update docs for on-demand configMatthew Holt
2023-08-09fileserver: Don't repeat error for invalid method inside error context (#5705)Francis Lavoie
2023-08-09ci: Update to Go 1.21 (#5719)Matt Holt
* ci: Update to Go 1.21 * Bump quic-go to v0.37.4 * Check EnableFullDuplex err * Linter bug suppression See https://github.com/timakin/bodyclose/issues/52 --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-08-08ci: Add riscv64 (64-bit RISC-V) to goreleaser (#5720)Aaron Dewes
This will add 64-bit RISC-V Linux prebuilts for Caddy.
2023-08-08go.mod: Upgrade golang.org/x/net to 0.14.0 (#5718)Shyim
2023-08-07ci: Use gofumpt to format code (#5707)Jacob Gadikian
2023-08-07templates: Fix httpInclude (fix #5698)Matthew Holt
Allowable during feature freeze because this is a simple, non-invasive bug fix only.
2023-08-05go.mod: Upgrade to quic-go v0.37.3Matthew Holt
Fixes #5680 once and for all! Hopefully :) Thank you @marten-seemann for your excellent work!
2023-08-06cmd: Split unix sockets for admin endpoint addresses (#5696)Emily
* cmd: fix cli when admin endpoint uses new unix socket permission format Fixes a bug where the following Caddyfile ```Caddyfile { admin unix/admin.sock|0660 } ``` and `caddy reload --config Caddyfile` would throw the following error instead of reloading it: ``` INFO using provided configuration {"config_file": "Caddyfile", "config_adapter": ""} Error: sending configuration to instance: performing request: Post "http://127.0.0.1/load": dial unix admin.sock|0660: connect: no such file or directory [ERROR] exit status 1 ``` --- This bug also affected `caddy start` and `caddy stop`. * Move splitter function to internal --------- Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2023-08-05reverseproxy: do not parse upstream address too early if it contains ↵Mohammed Al Sahaf
replaceble parts (#5695) * reverseproxy: do not parse upstream address too early if it contains replaceble parts * remove unused method * cleanup * accommodate partially replaceable port
2023-08-04caddyfile: check that matched key is not a substring of the replacement key ↵WeidiDeng
(#5685)
2023-08-04chore: use `--clean` instead of `--rm-dist` for goreleaser (#5691)Mohammed Al Sahaf
2023-08-03go.mod: Upgrade quic-go to v0.37.2 (fix #5680)Matthew Holt
2023-08-03fileserver: browse: Render SVG images in gridMatthew Holt
2023-08-03reverseproxy: Fix hijack ordering which broke websockets (#5679)WeidiDeng
2023-08-03httpcaddyfile: Fix `string does not match ~[]E` error (#5675)Herman Slatman
Only happens for some people. Unable to confirm.
2023-08-02encode: Fix infinite recursion (#5672)Francis Lavoie
2023-08-02caddyhttp: Make use of `http.ResponseController` (#5654)Francis Lavoie
* caddyhttp: Make use of http.ResponseController Also syncs the reverseproxy implementation with stdlib's which now uses ResponseController as well https://github.com/golang/go/commit/2449bbb5e614954ce9e99c8a481ea2ee73d72d61 * Enable full-duplex for HTTP/1.1 * Appease linter * Add warning for builds with Go 1.20, so it's less surprising to users * Improved godoc for EnableFullDuplex, copied text from stdlib * Only wrap in encode if not already wrapped
2023-08-02go.mod: Upgrade dependencies esp. smallstep/certificatesMatthew Holt
This prevents initialization of a .step folder when it's not used.
2023-08-02core: Allow loopback hosts for admin endpoint (fix #5650) (#5664)Matt Holt
2023-08-02httpcaddyfile: Allow `hostnames` & logger name overrides for log directive ↵Francis Lavoie
(#5643) * httpcaddyfile: Allow `hostnames` override for log directive * Implement access logger name overrides * Fix panic & default logger clobbering edgecase
2023-08-01reverseproxy: Connection termination cleanup (#5663)mmm444
2023-07-31go.mod: Use quic-go 0.37.1Matthew Holt
Should fix panic in Go 1.21 where there was no RemoteAddr.
2023-07-25reverseproxy: Export ipVersions type (#5648)Omar Ramadan
allows AUpstreams to be instantiated externally
2023-07-25go.mod: Use latest CertMagic (v0.19.1)Matthew Holt
Fixes race condition
2023-07-25caddyhttp: Preserve original error (fix #5652)Matthew Holt
2023-07-22fileserver: add lazy image loading (#5646)ydylla
2023-07-21go.mod: Update quic-go to v0.37.0, bump to Go 1.20 minimum (#5644)Marten Seemann
* update quic-go to v0.37.0 * Bump to Go 1.20 * Bump golangci-lint version, yml syntax consistency * Use skip-pkg-cache workaround * Workaround needed for both? * Seeding weakrand is no longer necessary --------- Co-authored-by: Matt Holt <mholt@users.noreply.github.com> Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-07-21core: Refine mutex during reloads (fix #5628) (#5645)Matt Holt
Separate currentCtxMu to protect currentCtx, and a new rawCfgMu to protect rawCfg and synchronize loads.
2023-07-17go.mod: update quic-go to v0.36.2 (#5636)bt90
2023-07-17fileserver: Tweak grid view of browse templateMatthew Holt
All cells on row have same height. Center-align vertically.
2023-07-13fileserver: add `export-template` sub-command to `file-server` (#5630)Mohammed Al Sahaf
2023-07-12caddyfile: Fix comparing if two tokens are on the same line (#5626)WeidiDeng
* fix comparing if two tokens are on the same line * compare tokens from copies when importing
2023-07-11caddytls: Reuse certificate cache through reloads (#5623)Matt Holt
* caddytls: Don't purge cert cache on config reload * Update CertMagic This actually avoids reloading managed certs from storage when already in the cache, d'oh. * Fix bug; re-implement HasCertificateForSubject * Update go.mod: CertMagic tag
2023-07-08Minor tweaks to security.mdMatt Holt
2023-07-08reverseproxy: Pointer receiverMatthew Holt
This avoids copying the Upstream, which has an atomically-accessed value in it.
2023-07-08caddyhttp: Trim dot/space only on Windows (fix #5613)Matthew Holt
Follow-up to #2917. Path matcher needs to trim dots and spaces but only on Windows.
2023-07-01update quic-go to v0.36.1 (#5611)Marten Seemann
2023-06-30caddyconfig: Specify config adapter for HTTP loader (close #5607)Matthew Holt
2023-06-30core: Embed net.UDPConn to gain optimizations (#5606)WeidiDeng
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2023-06-30chore: remove deprecated property `rlcp` in goreleaser config (#5608)Mohammed Al Sahaf
2023-06-24core: Skip `chmod` for abstract unix sockets (#5596)Emily
because those aren't real paths on the filesystem and thus can't be `chmod`ed
2023-06-23core: Add optional unix socket file permissions (#4741)Emily
* core: Add optional unix socket file permissions This commit also changes the default unix socket file permissions to `u=w,g=,o=` (octal: `0200`). It used to default to the shell's umask (usually `u=rwx,g=rx,o=rx`, octal: `0755`). `/run/caddy.sock` -> `/run/caddy.sock` with `0200` default perms `/run/caddy.sock|0222` -> `/run/caddy.sock` with `0222` perms `|` instead of `:` is used as a separator, to account for the `:` in Windows drive letters (e.g. `C:\absolute\path.sock`) Fun fact: The old unix(7) man page (pre Jun 2016) stated a socket needs both read and write perms. Turns out, only write perms are needed. Corrected in https://github.com/mkerrisk/man-pages/commit/7578ea2f85b272363d22680d69e7d32f0b59c83b Despite this, most implementations still default to read+write to this date. * Add cases with Windows paths to test * Require write perms for the owning user
2023-06-22reverseproxy: Honor `tls_except_port` for active health checks (#5591)Francis Lavoie