summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
AgeCommit message (Collapse)Author
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-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-03fileserver: browse: Render SVG images in gridMatthew Holt
2023-08-03reverseproxy: Fix hijack ordering which broke websockets (#5679)WeidiDeng
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-01reverseproxy: Connection termination cleanup (#5663)mmm444
2023-07-25reverseproxy: Export ipVersions type (#5648)Omar Ramadan
allows AUpstreams to be instantiated externally
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-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-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-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-06-22reverseproxy: Honor `tls_except_port` for active health checks (#5591)Francis Lavoie
2023-06-20reverseproxy: weighted_round_robin load balancing policy (#5579)Saber Haj Rabiee
* added weighted round robin algorithm to load balancer * added an adapt integration test for wrr and fixed a typo * changed args format to Caddyfile args convention * added provisioner and validator for wrr * simplified the code and improved doc
2023-06-19reverseproxy: Experimental streaming timeouts (#5567)mmm444
* reverseproxy: WIP streaming timeouts * More verbose logging by using the child logger * reverseproxy: Implement streaming timeouts * reverseproxy: Refactor cleanup * reverseproxy: Avoid **time.Timer --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-06-16chore: remove refs of deprecated io/ioutil (#5576)guangwu
2023-06-15headers: Allow `>` to defer shortcut for replacements (#5574)Francis Lavoie
2023-06-13caddyhttp: Support custom network for HTTP/3 (#5573)Dominik Roos
Allow registering a custom network mapping for HTTP/3. This is useful if the original network for HTTP/1.1 and HTTP/2 is not a standard `unix`, `tcp4`, or `tcp6` network. To keep backwards compatibility, we fall back to `udp` if the original network is not registered in the mapping. Fixes #5555
2023-06-12reverseproxy: Fix parsing of source IP in case it's an ipv6 address (#5569)Corin Langosch
2023-06-05fileserver: browse: Better grid layout (#5564)365cent
* feat: better implementation of grid layout * fix: vertical alignment
2023-05-26templates: Add `readFile` action that does not evaluate templates (#5553)kassienull
* Create an includeRaw template function to include a file without parsing it as a template. Some formatting fixes * Rename to readFile, various docs adjustments --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-05-22fileserver: Don't set Etag if mtime is 0 or 1 (close #5548) (#5550)Matt Holt
2023-05-20fileserver: browse: minor tweaks for grid view, dark mode (#5545)pistasjis
* Make grid entries take up full width on mobile and fix breadcrumb color issue in dark mode Signed-off-by: Pistasj <odyssey346@disroot.org> * Do mholt's suggestions Signed-off-by: Pistasj <odyssey346@disroot.org> --------- Signed-off-by: Pistasj <odyssey346@disroot.org>
2023-05-20fileserver: Only set Etag if not already set (fix #5546) (#5547)Charles Duffy
2023-05-19fileserver: Fix file browser breadcrumb font (#5543)pistasjis
Signed-off-by: Pistasj <odyssey346@disroot.org>
2023-05-19caddyhttp: Fix h3 shutdown (#5541)WeidiDeng
* swap h3server close and listener close, avoid quic-listener not closing * fix typo
2023-05-19fileserver: More filetypes for browse iconsMatthew Holt
2023-05-19fileserver: Fix file browser footer in grid mode (#5536)pistasjis
* Fix file browser footer in grid Signed-off-by: Odyssey <odyssey346@disroot.org> * Fix file browser footer while in grid mode Signed-off-by: Pistasj <odyssey346@disroot.org> * Do mholt's suggestions Signed-off-by: Odyssey <odyssey346@disroot.org> --------- Signed-off-by: Odyssey <odyssey346@disroot.org> Signed-off-by: Pistasj <odyssey346@disroot.org>
2023-05-16caddyhttp: Implement named routes, `invoke` directive (#5107)Francis Lavoie
* caddyhttp: Implement named routes, `invoke` directive * gofmt * Add experimental marker * Adjust route compile comments
2023-05-16rewrite: use escaped path, fix #5278 (#5504)Tran Phong
* use escaped path while rewriting Signed-off-by: TP-O <letranphong2k1@gmail.com> * restore line break --------- Signed-off-by: TP-O <letranphong2k1@gmail.com>
2023-05-16headers: Add > Caddyfile shortcut for enabling defer (#5535)Francis Lavoie
2023-05-15reverseproxy: Expand port ranges to multiple upstreams in CLI + Caddyfile ↵Francis Lavoie
(#5494) * reverseproxy: Expand port ranges to multiple upstreams in CLI + Caddyfile * Add clarifying comment
2023-05-15fileserver: Use EscapedPath for browse (#5534)Matt Holt
* fileserver: Use EscapedPath for browse Fix #5143 * Fixes if filter element is not present * Remove extraneous line
2023-05-15caddyhttp: Refactor cert Managers (fix #5415) (#5533)Matt Holt
2023-05-11caddyhttp: Add a getter for Server.name (#5531)jjiang-stripe
2023-05-05reverseproxy: Optimize base case for least_conn and random_choose policies ↵Francis Lavoie
(#5487) When only a single request has the least amount of requests, there's no need to compute a random number, because the modulo of 1 will always be 0 anyways.
2023-05-05reverseproxy: Fix active health check header canonicalization, refactor (#5446)Francis Lavoie
2023-05-05reverseproxy: Add `fallback` for some policies, instead of always random (#5488)Francis Lavoie
2023-05-04fastcgi: Fix `capture_stderr` (#5515)eanavitarte
2023-05-03acmeserver: Configurable `resolvers`, fix smallstep deprecations (#5500)Francis Lavoie
* acmeserver: Configurable `resolvers`, fix smallstep deprecations * Improve default net/port * Update proxy resolvers parsing to use the new function * Update listeners.go Co-authored-by: itsxaos <33079230+itsxaos@users.noreply.github.com> --------- Co-authored-by: itsxaos <33079230+itsxaos@users.noreply.github.com>
2023-04-27logging: Add traceID field to access logs when tracing is active (#5507)Dave Henderson
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-04-26caddyhttp: Impl `ResponseWriter.Unwrap()`, prep for Go 1.20's ↵Kévin Dunglas
`ResponseController` (#5509) * feat: add support for ResponseWriter.Unwrap() * cherry-pick Francis' code
2023-04-25reverseproxy: Fix reinitialize upstream healthy metrics (#5498)Y.Horie
Co-authored-by: Dávid Szabó <david.szabo97@gmail.com>
2023-04-25fix some comments (#5508)cui fliter
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-24templates: Add `fileStat` function (#5497)Stéphane Mourey
* Add isDir template function * Update modules/caddyhttp/templates/tplcontext.go Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com> * Fix funcIsDir return value on error * Fix funcIsDir return false when root file system not specified * Add stat function, remove isDir function * Remove isDir function (really) * Rename stat to fileStat --------- Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>