aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp
AgeCommit message (Collapse)Author
2024-03-29fix lintWeidiDeng
2024-03-29close quic connections when server closesWeidiDeng
2024-03-27caddyhttp: add http.request.local{,.host,.port} placeholder (#6182)Emily
* caddyhttp: add `http.request.local{,.host,.port}` placeholder This is the counterpart of `http.request.remote{,.host,.port}`. `http.request.remote` operates on the remote client's address, while `http.request.local` operates on the address the connection arrived on. Take the following example: - Caddy serving on `203.0.113.1:80` - Client on `203.0.113.2` `http.request.remote.host` would return `203.0.113.2` (client IP) `http.request.local.host` would return `203.0.113.1` (server IP) `http.request.local.port` would return `80` (server port) I find this helpful for debugging setups with multiple servers and/or multiple network paths (multiple IPs, AnyIP, Anycast). Co-authored-by: networkException <[email protected]> * caddyhttp: add unit test for `http.request.local{,.host,.port}` * caddyhttp: add integration test for `http.request.local.port` * caddyhttp: fix `http.request.local.host` placeholder handling with unix sockets The implementation matches the one of `http.request.remote.host` now and returns the unix socket path (just like `http.request.local` already did) instead of an empty string. --------- Co-authored-by: networkException <[email protected]>
2024-03-25chore: remove repetitive word (#6193)sellskin
Signed-off-by: sellskin <[email protected]>
2024-03-23Added a null check to avoid segfault on rewrite query ops (#6191)Aziz Rmadi
2024-03-22rewrite: `uri query` replace operation (#6165)Aziz Rmadi
* Implemented query replace oeration * Modified replace operation to use regexes in caddyfile * Added more tests to uri query operations
2024-03-21caddyhttp: Allow `header` replacement with empty string (#6163)Francis Lavoie
2024-03-21vars: Make nil values act as empty string instead of `"<nil>"` (#6174)Francis Lavoie
2024-03-21chore: Update quic-go to v0.42.0 (#6176)Marten Seemann
* update quic-go to v0.42.0 * use a rate limiter to control QUIC source address verification * Lint * remove deprecated ListenQUIC * remove number of requests tracking * increase the number of handshakes before source address verification is needed * remove references to request counters * remove deprecated listen* --------- Co-authored-by: Francis Lavoie <[email protected]> Co-authored-by: WeidiDeng <[email protected]>
2024-03-21caddyhttp: Accept XFF header values with ports, when parsing client IP (#6183)Francis Lavoie
2024-03-20reverseproxy: configurable active health_passes and health_fails (#6154)Sam Ottenhoff
* reverseproxy: active health check allows configurable health_passes and health_fails * Need to reset counters after recovery * rename methods to be more clear that these are coming from active health checks * do not export methods
2024-03-18reverseproxy: Configurable forward proxy URL (#6114)Justin Angel
Co-authored-by: WeidiDeng <[email protected]>
2024-03-13caddyhttp: upgrade to cel v0.20.0 (#6161)jbrown-stripe
* upgrade to cel v0.20.0 * Attempt to address feedback and fix linter * Let's try this * Take that, you linter! * Oh there's more --------- Co-authored-by: Francis Lavoie <[email protected]> Co-authored-by: Matt Holt <[email protected]> Co-authored-by: Tristan Swadell @TristonianJones
2024-03-11caddyhttp: suppress flushing if the response is being buffered (#6150)WeidiDeng
* suppress flushing if the response is being buffered * fix lint --------- Co-authored-by: Matt Holt <[email protected]>
2024-03-10chore: encode: use FlushError instead of Flush (#6168)WeidiDeng
Co-authored-by: Francis Lavoie <[email protected]>
2024-03-10encode: write status immediately when status code is informational (#6164)WeidiDeng
2024-03-06rewrite: Implement `uri query` operations (#6120)Aziz Rmadi
* Implemented basic uri query operations * Added support for query operations block * Applied Replacer on all query keys and values * Implemented rename query key opration * Rewrite struct: Changed QueryOperations field to Query and comments cleanup * Cleaned up comments, changed the order of operations and added more tests * Changed order of fields in queryOps struct to match the operations order
2024-03-06fix struct names (#6151)huajin tong
Signed-off-by: thirdkeyword <[email protected]>
2024-03-05fileserver: Preserve query during canonicalization redirect (#6109)Francis Lavoie
* fileserver: Preserve query during canonicalization redirect * Clarify that only a path should be passed
2024-03-05logging: Implement `log_append` handler (#6066)Francis Lavoie
* logging: Implement `extra_log` handler * Rename to `log_append` * Rename `skip_log` to `log_skip` --------- Co-authored-by: Matt Holt <[email protected]>
2024-03-05vars: Allow overriding `http.auth.user.id` in replacer as a special case (#6108)Francis Lavoie
2024-03-05reverseproxy: SRV dynamic upstream failover (#5832)Matt Holt
* Implement grace period, but probably needs sync * Update cached freshness value * D'oh, actually use the grace period * Fix freshness math
2024-02-23reverseproxy: cookie should be Secure and SameSite=None when TLS (#6115)Sam Ottenhoff
* reverseproxy: cookie should be Secure and SameSite=None when TLS * Update modules/caddyhttp/reverseproxy/selectionpolicies_test.go Co-authored-by: Mohammed Al Sahaf <[email protected]> --------- Co-authored-by: Mohammed Al Sahaf <[email protected]>
2024-02-19reverseproxy: use context.WithoutCancel (#6116)WeidiDeng
2024-02-14caddyhttp: Register post-shutdown callbacks (#5948)Matt Holt
2024-02-13caddyhttp: Only attempt to enable full duplex for HTTP/1.x (#6102)Francis Lavoie
2024-02-12caddyauth: Drop support for `scrypt` (#6091)Francis Lavoie
2024-02-12caddyauth: Rename `basicauth` to `basic_auth` (#6092)Francis Lavoie
2024-02-09update commentKévin Dunglas
2024-02-09improved listKévin Dunglas
2024-02-09fix: add back text/*Kévin Dunglas
2024-02-09fix: add more media types to the compressed by default listKévin Dunglas
2024-02-07matchers: Drop `forwarded` option from `remote_ip` matcher (#6085)Francis Lavoie
2024-02-07caddyhttp: Test cases for `%2F` and `%252F` (#6084)Francis Lavoie
2024-02-06fileserver: Browse can show symlink target if enabled (#5973)Aziz Rmadi
* Added optional subdirective to browse allowing to reveal symlink paths. * Update modules/caddyhttp/fileserver/browsetplcontext.go --------- Co-authored-by: Matt Holt <[email protected]>
2024-01-25chore: Update quic-go to v0.41.0, bump Go minimum to 1.21 (#6043)Marten Seemann
Co-authored-by: Francis Lavoie <[email protected]> Co-authored-by: Matt Holt <[email protected]>
2024-01-25chore: enabling a few more linters (#5961)Yolan Romailler
Co-authored-by: Francis Lavoie <[email protected]>
2024-01-24caddyhttp: Fix panic when request missing ClientIPVarKey (#6040)Francis Lavoie
2024-01-23caddyfile: Normalize & flatten all unmarshalers (#6037)Francis Lavoie
2024-01-23cmd: reverseproxy: log: use caddy logger (#6042)Mohammed Al Sahaf
2024-01-22matchers: `query` now ANDs multiple keys (#6054)Aziz Rmadi
Co-authored-by: Francis Lavoie <[email protected]>
2024-01-15httpcaddyfile: Rewrite `root` and `rewrite` parsing to allow omitting ↵Francis Lavoie
matcher (#5844)
2024-01-13fileserver: Implement caddyfile.Unmarshaler interface (#5850)Francis Lavoie
2024-01-13reverseproxy: Add `tls_curves` option to HTTP transport (#5851)Bas Westerbaan
2024-01-13caddyhttp: Security enhancements for client IP parsing (#5805)Nebez Briefkani
Co-authored-by: Francis Lavoie <[email protected]>
2024-01-13filesystem: Globally declared filesystems, `fs` directive (#5833)a
2024-01-09reverseproxy: Only change Content-Length when full request is buffered (#5830)Fred Cox
fixes: https://github.com/caddyserver/caddy/issues/5829 Signed-off-by: Fred Cox <[email protected]>
2024-01-02chore: check against errors of `io/fs` instead of `os` (#6011)Mohammed Al Sahaf
* chore: replace `os.ErrNotExist` with `fs.ErrNotExist` * check against permission error from `io/fs` package
2023-12-31caddyhttp: support unix sockets in `caddy respond` command (#6010)networkException
previously the `caddy respond` command would treat the argument passed to --listen as a TCP socket address, iterating over a possible port range. this patch factors the server creation out into a separate function, allowing this to be reused in case the listen address is a unix network address.
2023-12-30fileserver: Add total file size to directory listing (#6003)Steffen Busch
* browse: Add total file size to directory listing * Apply suggestion to remove "in " Co-authored-by: Matt Holt <[email protected]> --------- Co-authored-by: Matt Holt <[email protected]>