summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-10fileserver: Add command shortcuts `-l` and `-a` (#5854)Kévin Dunglas
2023-10-10go.mod: Upgrade dependencies incl. x/net/httpMatthew Holt
Possibly important for the HTTP/2 Rapid Reset issue.
2023-10-07templates: Add dummy `RemoteAddr` to `httpInclude` request, proxy ↵Thanmay Nath
compatibility (#5845) * Enhancement: Allow X-Forwarded-For Header in httpInclude Virtual Requests The goal of this enhancement is to modify the funcHTTPInclude function in the Caddy codebase to include the X-Forwarded-For header in the virtual request. This change will enable reverse proxies to set the X-Forwarded-For header, ensuring that the client's IP address is correctly provided to the target endpoint. This modification is essential for applications that depend on the X-Forwarded-For header for various functionalities, such as authentication, logging, or content customization. * Updated tplcontext.go - set `virtReq.RemoteAddr = "127.0.0.1"` i have made the suggested changes * Apply suggestions from code review * Update modules/caddyhttp/templates/tplcontext.go --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-10-05reverseproxy: Allow fallthrough for response handlers without routes (#5780)Patrick Koenig
2023-10-02fix: caddytest.AssertResponseCode error message (#5853)Kévin Dunglas
2023-10-02build(deps): bump goreleaser/goreleaser-action from 4 to 5 (#5847)dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-01build(deps): bump actions/checkout from 3 to 4 (#5846)dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-26caddyhttp: Use LimitedReader for HTTPRedirectListenerMatthew Holt
2023-09-15fileserver: browse template SVG icons and UI tweaks (#5812)glowinthedark
* fileserver browse.html UI tweaks: folder-symlink icon, search fileserver browse.html UI tweaks: folder-symlink icon, search - ui - add folder-symlink SVG icon - search: use `<input type="search">` instead of `text` - fix npe with `sizebar.style.width` = null in grid mode * tabify whitespace Co-authored-by: Francis Lavoie <lavofr@gmail.com> --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-09-10reverseproxy: fix nil pointer dereference in AUpstreams.GetUpstreams (#5811)Pascal Vorwerk
fix a nil pointer dereference in AUpstreams.GetUpstreams when AUpstreams.Versions is not set (fixes caddyserver#5809) Signed-off-by: Pascal Vorwerk <info@fossores.de>
2023-09-08httpcaddyfile: fix placeholder shorthands in named routes (#5791)Đỗ Trọng Hải
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-09-07cmd: Prevent overwriting existing env vars with `--envfile` (#5803)Evan Van Dam
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-09-05ci: Run govulncheck (#5790)Đỗ Trọng Hải
* feat(ci): check vuln Go mods in CI * fix(ci): correct directive for govulncheck * refactor(ci): move govulncheck to lint.yml * refactor(lint): move govulncheck to different job
2023-08-29logging: query filter for array of strings (#5779)Paul Jeannot
Co-authored-by: Matt Holt <mholt@users.noreply.github.com> Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-08-29logging: Clone array on log filters, prevent side-effects (#5786)Francis Lavoie
Fixes https://caddy.community/t/is-caddy-mutating-header-content-from-logging-settings/20947
2023-08-29fileserver: Export BrowseTemplateMatthew Holt
This allows programs embedding Caddy to customize the browse template.
2023-08-25ci: ensure short-sha is exported correctly on all platforms (#5781)Mohammed Al Sahaf
2023-08-24caddyfile: Fix case where heredoc marker is empty after newline (#5769)Francis Lavoie
Fixes `panic: runtime error: slice bounds out of range [:3] with capacity 2` Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2023-08-24go.mod: Update quic-go to v0.38.0 (#5772)WeidiDeng
* go.mod: Update quic-go to v0.38.0 * run "go mod tidy" --------- Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2023-08-23chore: Appease gosec linter (#5777)Matt Holt
These happen to be harmless memory aliasing but I guess the linter can't know that and we can't really prove it in general.
2023-08-22replacer: change timezone to UTC for "time.now.http" placeholders (#5774)WeidiDeng
2023-08-20caddyfile: Adjust error formatting (#5765)Francis Lavoie
2023-08-19update quic-go to v0.37.6 (#5767)Marten Seemann
2023-08-19httpcaddyfile: Stricter errors for site and upstream address schemes (#5757)Karun Agarwal
Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com> Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-08-19caddyfile: Loosen heredoc parsing (#5761)Francis Lavoie
2023-08-18fileserver: docs: clarify the ability to produce JSON array with `browse` ↵Mohammed Al Sahaf
(#5751)
2023-08-18fix package typo (#5764)guangwu
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
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