summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-15reverseproxy: Support repeated --to flags in command (#4693)Isaac Parker
* feat: Multiple 'to' upstreams in reverse-proxy cmd * Repeat --to for multiple upstreams, rather than comma-separating in a single flag Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-09-15caddyhttp: Add 'skip_log' var to omit request from logs (#4691)Francis Lavoie
* caddyhttp: Implement `skip_log` handler * Refactor to use vars middleware Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-09-15httpcaddyfile: Fix bind when IPv6 is specified with network (#4950)Michael Stapelberg
* fix listening on IPv6 addresses: use net.JoinHostPort Commit 1e18afb5c862d62be130d563785de5c58f08ae8e broke my caddy setup. This commit fixes it. * Refactor solution; simplify, add descriptive comment * Move network to host, not copy Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2022-09-14cmd: Improve error message if config missingMatthew Holt
2022-09-13cmd: Customizable user agent (close #2795)Matthew Holt
2022-09-13httpcaddyfile: Fix sorting of repeated directivesMatthew Holt
Fixes #5037
2022-09-13caddyhttp: Very minor optimization to path matcherMatthew Holt
If * is in the matcher it will always match so we can just put it first.
2022-09-13caddyhttp: Explicitly disallow multiple regexp matchers (#5030)Francis Lavoie
* caddyhttp: Explicitly disallow multiple regexp matchers Fix #5028 Since the matchers would overwrite eachother, we should error out to tell the user their config doesn't make sense. * Update modules/caddyhttp/matchers.go Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-09-13caddytls: Error if placeholder is empty in 'ask'Matthew Holt
Fixes #5036
2022-09-12supplychain: publish signing cert, sbom, and signatures of sbom (#5027)Mohammed Al Sahaf
2022-09-10go.mod: Update truststoreMatthew Holt
2022-09-08Very minor tweaksMatthew Holt
2022-09-08core: Check error on ListenQUICMatthew Holt
2022-09-07fileserver: Ignore EOF when browsing empty dirMatthew Holt
Thanks to @WeidiDeng for reporting this
2022-09-07caddyhttp: ensure ResponseWriterWrapper and ResponseRecorder use ReadFrom if ↵fleandro
the underlying response writer implements it. (#5022) Doing so allows for splice/sendfile optimizations when available. Fixes #4731 Co-authored-by: flga <flga@users.noreply.github.com> Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2022-09-06cmd: Enhance some help textMatthew Holt
2022-09-05httpcaddyfile: Add a couple more placeholder shortcuts (#5015)Francis Lavoie
This adds: - `{file.*}` -> `{http.request.uri.path.file.*}` - `{file_match.*}` -> `{http.matchers.file.*}` This is a follow-up to #4993 which introduces the new URI file placeholders, and a shortcut for using `file` matcher output. For example, where the `try_files` directive is a shortcut for this: ``` @try_files file <files...> rewrite @try_files {http.matchers.file.relative} ``` It could instead be: ``` @try_files file <files...> rewrite @try_files {file_match.relative} ```
2022-09-05Merge pull request #5018 from hairyhenderson/allow-fs.FS-for-virtual-filesystemsDave Henderson
Drop requirement for filesystems to implement fs.StatFS
2022-09-05Drop requirement for filesystems to implement fs.StatFSDave Henderson
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2022-09-05ci: grant the `release` workflow the `write` permission to `contents` (#5017)Mohammed Al Sahaf
2022-09-05ci: add `id-token` permission and update the signing command (#5016)Mohammed Al Sahaf
2022-09-05go.mod: Upgrade CertMagic (v0.17.1)Matthew Holt
2022-09-05fileserver: Support glob expansion in file matcher (#4993)Matt Holt
* fileserver: Support glob expansion in file matcher * Fix tests * Fix bugs and tests * Attempt Windows fix, sigh * debug Windows, WIP * Continue debugging Windows * Another attempt at Windows * Plz Windows * Cmon... * Clean up, hope I didn't break anything
2022-09-05caddyhttp: Support `respond` with HTTP 103 Early Hints (#5006)Matt Holt
* caddyhttp: Support sending HTTP 103 Early Hints This adds support for early hints in the static_response handler. * caddyhttp: Don't record 1xx responses
2022-09-05Remove unnecessary error checkMatthew Holt
2022-09-05caddyauth: Speed up basicauth provision, deprecate scrypt (#4720)Francis Lavoie
* caddyauth: Speed up basicauth provisioning, precalculate fake password * Deprecate scrypt, allow using decoded bcrypt hashes * Add TODO note Co-authored-by: Matt Holt <mholt@users.noreply.github.com> Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-09-03ci: generate SBOM and sign artifacts using cosign (#4910)Mohammed Al Sahaf
* ci: sign artifacts using cosign * include SBOM
2022-09-02reverseproxy: Close hijacked conns on reload/quit (#4895)Matt Holt
* reverseproxy: Close hijacked conns on reload/quit We also send a Close control message to both ends of WebSocket connections. I have tested this many times in my dev environment with consistent success, although the variety of scenarios was limited. * Oops... actually call Close() this time * CloseMessage --> closeMessage Co-authored-by: Francis Lavoie <lavofr@gmail.com> * Use httpguts, duh * Use map instead of sync.Map Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2022-09-02core: Refactor listeners; use SO_REUSEPORT on Unix (#4705)Matt Holt
* core: Refactor listeners; use SO_REUSEPORT on Unix Just an experiment for now * Fix lint by logging error * TCP Keepalive configuration (#4865) * initial attempt at TCP Keepalive configuration * core: implement tcp-keepalive for linux * move canSetKeepAlive interface * Godoc for keepalive server parameter * handle return values * log keepalive errors * Clean up after bad merge * Merge in pluggable network types From 1edc1a45e3aee1f7d86b68c3ddaf2fd16ba8ab73 * Slight refactor, fix from recent merge conflict Co-authored-by: Karmanyaah Malhotra <karmanyaah.gh@malhotra.cc>
2022-09-02fastcgi: Optimize FastCGI transport (#4978)WeidiDeng
* break up code and use lazy reading and pool bufio.Writer * close underlying connection when operation failed * allocate bufWriter and streamWriter only once * refactor record writing * rebase from master * handle err * Fix type assertion Also reduce some duplication * Refactor client and clientCloser for logging Should reduce allocations * Minor cosmetic adjustments; apply Apache license * Appease the linter Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2022-09-02Minor style adjustments for HTTP redir loggingMatthew Holt
2022-09-02Update readmeMatthew Holt
2022-09-02Minor fix of error logMatthew Holt
2022-09-02notify: Don't send ready after error (fix #5003)Matthew Holt
Also simplify the notify package quite a bit. Also move stop notification into better place. Add ability to send status or error.
2022-09-01templates: Document `httpError` function (#4972)Avdhut
* added the httpError function into the document * Update templates.go * Update templates.go * Fix gofmt Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-09-02fastcgi: allow users to log stderr output (#4967) (#5004)fleandro
Co-authored-by: flga <flga@users.noreply.github.com>
2022-09-01cmd: Don't print long help text on errorMatthew Holt
2022-09-01Fix failing testMatthew Holt
2022-09-01dist: deb package manpages and bash completion scripts (#5007)Mohammed Al Sahaf
2022-09-01caddyhttp: Copy logger config to HTTP server during AutoHTTPS (#4990)Francis Lavoie
2022-09-01map: Coerce val to string, fix #4987Matthew Holt
Also prevent infinite recursion, and enforce placeholder syntax.
2022-09-01httpcaddyfile: Add shortcut for expression matchers (#4976)Francis Lavoie
2022-09-01caddyhttp: Accept placeholders in vars matcher keyMatthew Holt
Until now, the vars matcher has unintentionally lacked parity with the map directive: the destination placeholders of the map directive would be expressed as placeholders, i.e. {foo}. But the vars matcher would not use { }: vars foo value This looked weird, and was confusing, since it implied that the key could be dynamic, which doesn't seem helpful here. I think this is a proper bug fix, since we're not used to accessing placeholders literally without { } in the Caddyfile.
2022-09-01core: Plugins can register listener networks (#5002)Matt Holt
* core: Plugins can register listener networks This can be useful for custom listeners. This feature/API is experimental and may change! * caddyhttp: Expose server listeners
2022-08-31caddyhttp: Disable draft versions of QUICMatthew Holt
See comment in #4996
2022-08-31events: Tune logging and context cancellationMatthew Holt
2022-08-31events: Implement event system (#4912)Francis Lavoie
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-08-31httpcaddyfile: Add `{cookie.*}` placeholder shortcut (#5001)Francis Lavoie
2022-08-31caddyhttp: Set Content-Type for static response (#4999)Matt Holt
2022-08-30cmd: Enhance CLI docsMatthew Holt